[ Index ] |
|
Code source de Cr@wltr@ck 2.2.1 |
1 <?php 2 //---------------------------------------------------------------------- 3 // CrawlTrack 2.2.1 4 //---------------------------------------------------------------------- 5 // Crawler Tracker for website 6 //---------------------------------------------------------------------- 7 // Author: Jean-Denis Brun 8 //---------------------------------------------------------------------- 9 // Website: www.crawltrack.fr 10 //---------------------------------------------------------------------- 11 // That script is distributed under GNU GPL license 12 //---------------------------------------------------------------------- 13 // file: admin.php 14 //---------------------------------------------------------------------- 15 16 if (!defined('IN_CRAWLT')) 17 { 18 echo"<h1>Hacking attempt !!!!</h1>"; 19 exit(); 20 } 21 22 // do not modify 23 define('IN_CRAWLT_ADMIN', TRUE); 24 25 26 //include menu 27 include "include/menumain.php"; 28 echo"<div class=\"content\">\n"; 29 30 if( $_SESSION['rightadmin']==1) 31 { 32 33 if($validform==6) 34 { 35 include "include/adminuser.php"; 36 } 37 elseif($validform==7) 38 { 39 include "include/adminusersite.php"; 40 } 41 elseif($validform==4) 42 { 43 include "include/adminsite.php"; 44 } 45 elseif($validform==3) 46 { 47 include "include/admintag.php"; 48 } 49 elseif($validform==2) 50 { 51 include "include/admincrawler.php"; 52 } 53 elseif($validform==8) 54 { 55 include "include/adminusersuppress.php"; 56 } 57 elseif($validform==9) 58 { 59 include "include/adminsitesuppress.php"; 60 } 61 elseif($validform==10) 62 { 63 include "include/admincrawlersuppress.php"; 64 } 65 elseif($validform==11) 66 { 67 include "include/testcrawlercreation.php"; 68 } 69 elseif($validform==12) 70 { 71 include "include/testcrawlersuppress.php"; 72 } 73 elseif($validform==13) 74 { 75 include "include/update.php"; 76 } 77 elseif($validform==14) 78 { 79 include "include/updateremote.php"; 80 } 81 elseif($validform==15) 82 { 83 include "include/updatelocal.php"; 84 } 85 elseif($validform==16) 86 { 87 include "include/logochoice.php"; 88 } 89 elseif($validform==17) 90 { 91 include "include/admindatasuppress.php"; 92 } 93 elseif($validform==18) 94 { 95 include "include/admintime.php"; 96 } 97 elseif($validform==19) 98 { 99 include "include/adminipsuppress.php"; 100 } 101 elseif($validform==20) 102 { 103 include "include/adminmail.php"; 104 } 105 elseif($validform==21) 106 { 107 include "include/adminpublicstats.php"; 108 } 109 elseif($validform==22) 110 { 111 include "include/adminfirstweekday.php"; 112 } 113 elseif($validform==23) 114 { 115 include "include/adminmodifsite.php"; 116 } 117 elseif($validform==24) 118 { 119 include "include/admindatasuppress2.php"; 120 } 121 elseif($validform==25) 122 { 123 include "include/adminlang.php"; 124 } 125 elseif($validform==26) 126 { 127 include "include/admindatabase.php"; 128 } 129 else 130 { 131 if($validform==96) 132 { 133 //update the crawlt_config_table 134 135 //database connection 136 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem"); 137 $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem"); 138 139 $sql ="UPDATE crawlt_config SET typecharset='".sql_quote($crawltcharset)."'"; 140 141 $requete = mysql_query($sql, $connexion) or die("MySQL query error"); 142 } 143 if($validform==97) 144 { 145 //update the crawlt_config_table 146 147 //database connection 148 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem"); 149 $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem"); 150 151 $sql ="UPDATE crawlt_config SET typemail='".sql_quote($crawltmailishtml)."'"; 152 153 $requete = mysql_query($sql, $connexion) or die("MySQL query error"); 154 } 155 if($validform==98) 156 { 157 //update the crawlt_config_table 158 159 //database connection 160 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem"); 161 $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem"); 162 163 $sql ="UPDATE crawlt_config SET rowdisplay='".sql_quote($rowdisplay)."'"; 164 165 $requete = mysql_query($sql, $connexion) or die("MySQL query error"); 166 } 167 if($validform==99) 168 { 169 //update the crawlt_config_table 170 171 //database connection 172 $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem"); 173 $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem"); 174 175 $sql ="UPDATE crawlt_config SET orderdisplay='".sql_quote($order)."'"; 176 177 $requete = mysql_query($sql, $connexion) or die("MySQL query error"); 178 } 179 180 181 echo"<h1>". $language['admin']."</h1>\n"; 182 echo"<table><tr><td width=\"550px\" >"; 183 184 185 echo"<h5><img src=\"./images/page_white_php.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=16\">".$language['see_tag']."</a></h5><br>\n"; 186 187 188 echo"<h5><img src=\"./images/tick.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=11\">".$language['crawler_test_creation']."</a></h5>\n"; 189 echo"<h5><img src=\"./images/cancel.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=12\">".$language['crawler_test_suppress']."</a></h5><br>\n"; 190 191 echo"<h5><img src=\"./images/transmit_add.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=13\">".$language['update_crawler']."</a></h5>\n"; 192 echo"<h5><img src=\"./images/email.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=20\">".$language['mail']."</a></h5>\n"; 193 echo"<h5><img src=\"./images/clock.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=18\">".$language['time_set_up']."</a></h5>\n"; 194 echo"<h5><img src=\"./images/calendar_view_week.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=22\">".$language['firstweekday-title']."</a></h5>\n"; 195 echo"<h5><img src=\"./images/lock_open.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=21\">".$language['public']."</a></h5>\n"; 196 echo"<h5><img src=\"./images/language.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=25\">".$language['choose_language']."</a></h5><br>\n"; 197 198 199 echo"</td><td valign=\"top\" width=\"450px\">"; 200 201 if($crawltlang=='french' OR $crawltlang=='frenchiso') 202 { 203 echo"<h2>CrawlTrack infos<br><iframe name=\"I1\" src=\"http://www.crawltrack.fr/news/crawltrack-news-fr.htm\" marginwidth=\"1\" marginheight=\"1\" scrolling=\"auto\" border=\"1\" bordercolor=\"#003399\" frameborder=\"1px\" width=\"300px\" height=\"150px\"></iframe></h2>\n"; 204 } 205 else 206 { 207 echo"<h2>CrawlTrack news<br><iframe name=\"I1\" src=\"http://www.crawltrack.fr/news/crawltrack-news-en.htm\" marginwidth=\"1\" marginheight=\"1\" scrolling=\"auto\" border=\"1\" bordercolor=\"#003399\" frameborder=\"1px\" width=\"300px\" height=\"150px\"></iframe></h2>\n"; 208 } 209 210 211 echo"<br><h2>".$language['display_parameters']."</h2>"; 212 213 echo"<div style=\"border: 2px solid #003399 ; padding-left:5px; padding-top:5px; padding-bottom:15px; margin-left:71px; margin-right:71px;\" >\n"; 214 echo"<form action=\"index.php\" method=\"POST\" z-index:0 style=\" font-size:13px; font-weight:bold; color: #003399; 215 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">\n"; 216 217 echo "<input type=\"hidden\" name ='navig' value=\"6\">\n"; 218 echo "<input type=\"hidden\" name ='validform' value=\"98\">\n"; 219 echo $language['numberrowdisplay']."<input name='rowdisplay' value='$rowdisplay' type='text' maxlength='5' size='5px' style=\" font-size:13px; font-weight:bold; color: #003399; 220 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif; float:left\"/><input name='ok' type='submit' value=' OK ' size='20' style=\" float:left\">\n"; 221 echo"</form><br><br>\n"; 222 223 224 echo"<form action=\"index.php\" method=\"POST\" z-index:0 style=\" font-size:13px; font-weight:bold; color: #003399; 225 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">\n"; 226 227 echo "<input type=\"hidden\" name ='navig' value=\"6\">\n"; 228 echo "<input type=\"hidden\" name ='validform' value=\"99\">\n"; 229 echo $language['ordertype']."<select onchange=\"form.submit()\" size=\"1\" name=\"order\" style=\" font-size:13px; font-weight:bold; color: #003399; 230 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif; float:left\">\n"; 231 232 if($order==0) 233 { 234 echo"<option value=\"0\" selected style=\" font-size:13px; font-weight:bold; color: #003399; 235 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbydate']."</option>\n"; 236 } 237 else 238 { 239 echo"<option value=\"0\" style=\" font-size:13px; font-weight:bold; color: #003399; 240 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbydate']."</option>\n"; 241 } 242 243 if($order==1 OR $order==4) 244 { 245 echo"<option value=\"1\" selected style=\" font-size:13px; font-weight:bold; color: #003399; 246 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbypagesview']."</option>\n"; 247 } 248 else 249 { 250 echo"<option value=\"1\" style=\" font-size:13px; font-weight:bold; color: #003399; 251 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbypagesview']."</option>\n"; 252 } 253 254 if($order==2) 255 { 256 echo"<option value=\"2\" selected style=\" font-size:13px; font-weight:bold; color: #003399; 257 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbyvisites']."</option>\n"; 258 } 259 else 260 { 261 echo"<option value=\"2\" style=\" font-size:13px; font-weight:bold; color: #003399; 262 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbyvisites']."</option>\n"; 263 } 264 265 if($order==3) 266 { 267 echo"<option value=\"3\" selected style=\" font-size:13px; font-weight:bold; color: #003399; 268 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbyname']."</option>\n"; 269 } 270 else 271 { 272 echo"<option value=\"3\" style=\" font-size:13px; font-weight:bold; color: #003399; 273 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif;\">".$language['orderbyname']."</option>\n"; 274 } 275 276 echo"</select></form><br> \n"; 277 278 279 echo"<form action=\"index.php\" method=\"POST\" z-index:0 style=\" font-size:13px; font-weight:bold; color: #003399; 280 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif; \">\n"; 281 282 echo "<input type=\"hidden\" name ='navig' value=\"6\">\n"; 283 echo "<input type=\"hidden\" name ='validform' value=\"97\">\n"; 284 echo "Email:<br>\n"; 285 286 if($crawltmailishtml==1) 287 { 288 echo"<input type=\"radio\" name=\"typemail\" value=\"1\" checked>HTML \n"; 289 echo"<input type=\"radio\" name=\"typemail\" value=\"2\">Text\n"; 290 } 291 else 292 { 293 echo"<input type=\"radio\" name=\"typemail\" value=\"1\">HTML \n"; 294 echo"<input type=\"radio\" name=\"typemail\" value=\"2\" checked>Text\n"; 295 } 296 echo"<input name='ok' type='submit' value=' OK ' size='20' >\n"; 297 echo"</form> \n"; 298 299 300 echo"<form action=\"index.php\" method=\"POST\" z-index:0 style=\" font-size:13px; font-weight:bold; color: #003399; 301 font-family: Verdana,Geneva, Arial, Helvetica, Sans-Serif; \">\n"; 302 303 echo "<input type=\"hidden\" name ='navig' value=\"6\">\n"; 304 echo "<input type=\"hidden\" name ='validform' value=\"96\">\n"; 305 echo "Charset:<br>\n"; 306 307 if($crawltcharset==1) 308 { 309 echo"<input type=\"radio\" name=\"charset\" value=\"1\" checked>utf-8 \n"; 310 echo"<input type=\"radio\" name=\"charset\" value=\"2\">iso-8859-1\n"; 311 } 312 else 313 { 314 echo"<input type=\"radio\" name=\"charset\" value=\"1\">utf-8 \n"; 315 echo"<input type=\"radio\" name=\"charset\" value=\"2\" checked>iso-8859-1\n"; 316 } 317 echo"<input name='ok' type='submit' value=' OK ' size='20' >\n"; 318 echo"</form></div> \n"; 319 320 321 322 323 324 325 326 echo"</td></tr></table>"; 327 328 329 330 echo"<h5><img src=\"./images/user_add.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=6\">".$language['user_create']."</a></h5>\n"; 331 echo"<h5><img src=\"./images/user_add.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=7\">".$language['user_site_create']."</a></h5>\n"; 332 echo"<h5><img src=\"./images/world_add.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=4\">".$language['new_site']."</a></h5>\n"; 333 echo"<h5><img src=\"./images/world_edit.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=23\">".$language['modif_site']."</a></h5>\n"; 334 echo"<h5><img src=\"./images/database_add.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=2\">".$language['new_crawler']."</a></h5><br>\n"; 335 336 echo"<h5><img src=\"./images/user_delete.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=8\">".$language['user_suppress']."</a></h5>\n"; 337 echo"<h5><img src=\"./images/world_delete.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=9\">".$language['site_suppress']."</a></h5>\n"; 338 echo"<h5><img src=\"./images/database_delete.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=10\">".$language['crawler_suppress']."</a></h5>\n"; 339 echo"<h5><img src=\"./images/database_delete.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=19\">".$language['ip_suppress']."</a></h5><br>\n"; 340 341 echo"<h5><img src=\"./images/database.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=26\">".$language['admin_database']."</a></h5>\n"; 342 echo"<h5><img src=\"./images/compress.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=17\">".$language['data_suppress']."</a></h5>\n"; 343 echo"<h5><img src=\"./images/database_delete.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=24\">".$language['data_human_suppress']."</a></h5><br>\n"; 344 345 346 347 } 348 349 350 351 } 352 else 353 { 354 if($validform==3) 355 { 356 include "include/admintag.php"; 357 } 358 elseif($validform==16) 359 { 360 include "include/logochoice.php"; 361 } 362 else 363 { 364 echo"<h1>". $language['admin']."</h1>\n"; 365 echo"<h5><img src=\"./images/page_white_php.png\" width=\"16\" height=\"16\" border=\"0\" > <a href=\"./index.php?navig=6&validform=16\">".$language['see_tag']."</a></h5>\n"; 366 echo"<br><br><br><br><br><br><br><br>"; 367 } 368 } 369 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Sep 6 14:14:11 2007 | par Balluche grâce à PHPXref 0.7 |