-
Notifications
You must be signed in to change notification settings - Fork 0
/
yahoo_image.php
68 lines (55 loc) · 2.2 KB
/
yahoo_image.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/***************************************************************************
*
* File : yahoo_image.php
* Software : Kwikcontent
* Version : 1.1
* Release Date : August 29, 2009
* Copyright : (C) 2009 Samson Software
* Contact : http://www.kwikcontent.com/
* License : Limited to one owner. My not be reproduced or
* redistributed under any circumstance.
*
***************************************************************************/
//Request needed includes
include_once('includes/_global.php');
include_once('includes/public_config.php');
include_once('includes/yahoo.php');
//$smarty->debugging = true;
//ensure an image has been passed
if ($yim > 0) {
$img = new YahooImage($yim);
$img->loadVars();
if (!$img->yim_id > 0) {
//this is an old/dead keyword
$redirect = true;
}
//load the needed vars
$img->ripData();
//throw the key to smarty
$smarty->assign("image", get_object_vars($img));
//find and load the proper key
$key = new Keyword($img->key_id);
$key->loadVars();
$smarty->assign("keyword", get_object_vars($key));
} else {
$redirect = true;
}
if ($redirect) {
$url = BASE_URL;
header("Location: $url");
}
//create breadcrumb
$breadcrumb = '<a href="'.BASE_FOLDER.'">Home</a> > <a href="'.$key->getKeywordLocation().'">'.ucwords($key->getTitle('keyword')).'</a> > <a href="'.$key->getYahooImagesLocation().'">'.ucwords($key->getTitle('yahoo_images')).'</a> > '.$img->img_info['Title'];
$smarty->assign("BREADCRUMB", $breadcrumb);
//establish vars for template
$smarty->assign('WINDOW_TITLE', ($domain->domain_window_titles ? $domain->domain_title.$domain->delimiters['window_title'] : '').ucwords($key->getTitle('yahoo_image')).' - '.$img->img_info['Title']);
$smarty->assign('META_DESCRIPTION', ucwords($key->getTitle('yahoo_image')).'. You are viewing '.$img->img_info['Title'].'.');
$smarty->assign('META_KEYS', getKeywordString());
//load a header file for any preprocessing
include_once('includes/public_header.php');
//output page
$smarty->display('yahoo_image.htm');
//load a footer file for any postprocessing
include_once('includes/public_footer.php');
?>