[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************/ 4 /* 3D-Fantasy.com Theme */ 5 /* by Francisco Burzi */ 6 /* */ 7 /* Based on my theme Kaput with more clean design and used */ 8 /* in my 3D Portal http://3d-fantasy.com */ 9 /* Remember to change the logo. The default logo has been */ 10 /* left as a "reference only". */ 11 /************************************************************/ 12 13 /************************************************************/ 14 /* IMPORTANT NOTE FOR THEMES DEVELOPERS! */ 15 /* */ 16 /* When you start coding your theme, if you want to */ 17 /* distribute it, please double check it to fit the HTML */ 18 /* 4.01 Transitional Standard. You can use the W3 validator */ 19 /* located at http://validator.w3.org */ 20 /* If you don't know where to start with your theme, just */ 21 /* start modifying this theme, it's validate and is cool ;) */ 22 /************************************************************/ 23 24 /************************************************************/ 25 /* Theme Colors Definition */ 26 /* */ 27 /* Define colors for your web site. $bgcolor2 is generaly */ 28 /* used for the tables border as you can see on OpenTable() */ 29 /* function, $bgcolor1 is for the table background and the */ 30 /* other two bgcolor variables follows the same criteria. */ 31 /* $texcolor1 and 2 are for tables internal texts */ 32 /************************************************************/ 33 34 $bgcolor1 = "#d5d5d5"; 35 $bgcolor2 = "#7b91ac"; 36 $bgcolor3 = "#ffffff"; 37 $bgcolor4 = "#d5d5d5"; 38 $textcolor1 = "#000000"; 39 $textcolor2 = "#000000"; 40 if(file_exists("themes/3D-Fantasy/tables.php")){ 41 include ("themes/3D-Fantasy/tables.php"); 42 } 43 /************************************************************/ 44 /* Function themeheader() */ 45 /* */ 46 /* Control the header for your site. You need to define the */ 47 /* BODY tag and in some part of the code call the blocks */ 48 /* function for left side with: blocks(left); */ 49 /************************************************************/ 50 51 function themeheader() { 52 global $user, $banners, $sitename, $slogan, $cookie, $prefix, $anonymous, $db; 53 cookiedecode($user); 54 $username = $cookie[1]; 55 if (empty($username)) { 56 $username = $anonymous; 57 } 58 echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\"><br>\n\n\n"; 59 ads(0); 60 $topics_list = "<select name=\"topic\" onChange='submit()'>\n"; 61 $topics_list .= "<option value=\"\">All Topics</option>\n"; 62 $toplist = $db->sql_query("select topicid, topictext from ".$prefix."_topics order by topictext"); 63 while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) { 64 $topicid = intval($topicid); 65 if ($topicid==$topic) { $sel = "selected "; } 66 $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n"; 67 $sel = ""; 68 } 69 if ($username == $anonymous) { 70 $theuser = " <a href=\"modules.php?name=Your_Account\">Create an account"; 71 } else { 72 $theuser = " Welcome $username!"; 73 } 74 $public_msg = public_message(); 75 $tmpl_file = "themes/3D-Fantasy/header.html"; 76 $thefile = implode("", file($tmpl_file)); 77 $thefile = addslashes($thefile); 78 $thefile = "\$r_file=\"".$thefile."\";"; 79 eval($thefile); 80 print $r_file; 81 blocks("left"); 82 $tmpl_file = "themes/3D-Fantasy/left_center.html"; 83 $thefile = implode("", file($tmpl_file)); 84 $thefile = addslashes($thefile); 85 $thefile = "\$r_file=\"".$thefile."\";"; 86 eval($thefile); 87 print $r_file; 88 } 89 90 /************************************************************/ 91 /* Function themefooter() */ 92 /* */ 93 /* Control the footer for your site. You don't need to */ 94 /* close BODY and HTML tags at the end. In some part call */ 95 /* the function for right blocks with: blocks(right); */ 96 /* Also, $index variable need to be global and is used to */ 97 /* determine if the page your're viewing is the Homepage or */ 98 /* and internal one. */ 99 /************************************************************/ 100 101 function themefooter() { 102 global $index, $foot1, $foot2, $foot3, $foot4; 103 if (defined('INDEX_FILE')) { 104 $tmpl_file = "themes/3D-Fantasy/center_right.html"; 105 $thefile = implode("", file($tmpl_file)); 106 $thefile = addslashes($thefile); 107 $thefile = "\$r_file=\"".$thefile."\";"; 108 eval($thefile); 109 print $r_file; 110 blocks("right"); 111 } 112 $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4"; 113 $tmpl_file = "themes/3D-Fantasy/footer.html"; 114 $thefile = implode("", file($tmpl_file)); 115 $thefile = addslashes($thefile); 116 $thefile = "\$r_file=\"".$thefile."\";"; 117 eval($thefile); 118 print $r_file; 119 } 120 121 /************************************************************/ 122 /* Function themeindex() */ 123 /* */ 124 /* This function format the stories on the Homepage */ 125 /************************************************************/ 126 127 function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) { 128 global $anonymous, $tipath; 129 $ThemeSel = get_theme(); 130 if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) { 131 $t_image = "themes/$ThemeSel/images/topics/$topicimage"; 132 } else { 133 $t_image = "$tipath$topicimage"; 134 } 135 if (!empty($notes)) { 136 $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n"; 137 } else { 138 $notes = ""; 139 } 140 if ("$aid" == "$informant") { 141 $content = "$thetext$notes\n"; 142 } else { 143 if(!empty($informant)) { 144 $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> "; 145 } else { 146 $content = "$anonymous "; 147 } 148 $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n"; 149 } 150 $posted = ""._POSTEDBY." "; 151 $posted .= get_author($aid); 152 $posted .= " "._ON." $time $timezone ($counter "._READS.")"; 153 $tmpl_file = "themes/3D-Fantasy/story_home.html"; 154 $thefile = implode("", file($tmpl_file)); 155 $thefile = addslashes($thefile); 156 $thefile = "\$r_file=\"".$thefile."\";"; 157 eval($thefile); 158 print $r_file; 159 } 160 161 /************************************************************/ 162 /* Function themeindex() */ 163 /* */ 164 /* This function format the stories on the story page, when */ 165 /* you click on that "Read More..." link in the home */ 166 /************************************************************/ 167 168 function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) { 169 global $admin, $sid, $tipath; 170 $ThemeSel = get_theme(); 171 if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) { 172 $t_image = "themes/$ThemeSel/images/topics/$topicimage"; 173 } else { 174 $t_image = "$tipath$topicimage"; 175 } 176 $posted = ""._POSTEDON." $datetime "._BY." "; 177 $posted .= get_author($aid); 178 if (!empty($notes)) { 179 $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n"; 180 } else { 181 $notes = ""; 182 } 183 if ("$aid" == "$informant") { 184 $content = "$thetext$notes\n"; 185 } else { 186 if(!empty($informant)) { 187 $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> "; 188 } else { 189 $content = "$anonymous "; 190 } 191 $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n"; 192 } 193 $tmpl_file = "themes/3D-Fantasy/story_page.html"; 194 $thefile = implode("", file($tmpl_file)); 195 $thefile = addslashes($thefile); 196 $thefile = "\$r_file=\"".$thefile."\";"; 197 eval($thefile); 198 print $r_file; 199 } 200 201 /************************************************************/ 202 /* Function themesidebox() */ 203 /* */ 204 /* Control look of your blocks. Just simple. */ 205 /************************************************************/ 206 207 function themesidebox($title, $content) { 208 $tmpl_file = "themes/3D-Fantasy/blocks.html"; 209 $thefile = implode("", file($tmpl_file)); 210 $thefile = addslashes($thefile); 211 $thefile = "\$r_file=\"".$thefile."\";"; 212 eval($thefile); 213 print $r_file; 214 } 215 216 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |