[ Index ]
 

Code source de Cr@wltr@ck 2.2.1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/include/ -> adminfirstweekday.php (source)

   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: adminfirstweekday.php

  14  //----------------------------------------------------------------------

  15  
  16  if (!defined('IN_CRAWLT_ADMIN'))
  17  {
  18      echo"<h1>Hacking attempt !!!!</h1>";
  19      exit();
  20  }
  21  
  22  
  23  echo"<h1>".$language['firstweekday-title']."</h1>\n";
  24  
  25  if($firstdayweek=='Monday')
  26      {
  27  
  28      
  29      if($validsite==1)
  30          {
  31          //update the crawlt_config_table

  32          
  33          //database connection

  34          $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem");
  35          $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem");
  36          
  37          $sqlupdatepublic ="UPDATE crawlt_config SET firstdayweek='Sunday'";
  38          
  39          $requeteupdatepublic = mysql_query($sqlupdatepublic, $connexion) or die("MySQL query error");
  40          
  41          //clear cache table

  42          $sqlcache = "TRUNCATE TABLE crawlt_cache";
  43          $requetecache = mysql_query($sqlcache, $connexion) or die("MySQL query error");
  44                     
  45            
  46          echo"<br><br><p>".$language['update']."</p><br><br>";    
  47              
  48          //continue

  49  
  50      
  51          echo"<form action=\"index.php\" method=\"POST\" >\n";
  52          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
  53          echo"<table class=\"centrer\">\n";    
  54          echo"<tr>\n";
  55          echo"<td colspan=\"2\">\n";
  56          echo"<input name='ok' type='submit'  value='OK ' size='20'>\n";
  57          echo"</td>\n";
  58          echo"</tr>\n";
  59          echo"</table>\n";
  60          echo"</form><br>\n";                 
  61          }
  62      else
  63          {
  64          echo"<br><br><p>".$language['firstweekday-set-up2']."</p>\n";
  65             
  66          echo"<div class=\"form\">\n";
  67          echo"<form action=\"index.php\" method=\"POST\" >\n";
  68          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
  69          echo "<input type=\"hidden\" name ='validform' value=\"22\">";
  70          echo "<input type=\"hidden\" name ='validsite' value=\"1\">";
  71          echo"<table class=\"centrer\">\n";
  72          echo"<tr>\n";
  73          echo"<td>\n";
  74          echo"<input name='ok' type='submit'  value=".$language['yes']." size='20'>\n";
  75          echo"</td>\n";
  76          echo"</tr>\n";
  77          echo"</table>\n";
  78          echo"</form><br>\n"; 
  79      
  80          echo"<form action=\"index.php\" method=\"POST\" >\n";
  81          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
  82          echo"<table class=\"centrer\">\n";
  83          echo"<tr>\n";
  84          echo"<td>\n";
  85          echo"<input name='ok' type='submit'  value=".$language['no']." size='20'>\n";
  86          echo"</td>\n";
  87          echo"</tr>\n";
  88          echo"</table>\n";
  89          echo"</form><br>\n";    
  90            
  91          echo"</div><br>\n";    
  92          
  93          }
  94          
  95      }
  96  else
  97      {
  98      if($validsite !=1)
  99          {
 100          //form    

 101                         
 102          echo"<br><br><p>".$language['firstweekday-set-up']."</p>\n";
 103             
 104          echo"<div class=\"form\">\n";
 105          echo"<form action=\"index.php\" method=\"POST\" >\n";
 106          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
 107          echo "<input type=\"hidden\" name ='validform' value=\"22\">";
 108          echo "<input type=\"hidden\" name ='validsite' value=\"1\">";
 109          echo"<table class=\"centrer\">\n";
 110          echo"<tr>\n";
 111          echo"<td>\n";
 112          echo"<input name='ok' type='submit'  value=".$language['yes']." size='20'>\n";
 113          echo"</td>\n";
 114          echo"</tr>\n";
 115          echo"</table>\n";
 116          echo"</form><br>\n"; 
 117      
 118          echo"<form action=\"index.php\" method=\"POST\" >\n";
 119          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
 120          echo"<table class=\"centrer\">\n";
 121          echo"<tr>\n";
 122          echo"<td>\n";
 123          echo"<input name='ok' type='submit'  value=".$language['no']." size='20'>\n";
 124          echo"</td>\n";
 125          echo"</tr>\n";
 126          echo"</table>\n";
 127          echo"</form><br>\n";    
 128            
 129          echo"</div><br>\n"; 
 130          }
 131      else
 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          $sqlupdatepublic ="UPDATE crawlt_config SET firstdayweek='Monday'";
 140          
 141          $requeteupdatepublic = mysql_query($sqlupdatepublic, $connexion) or die("MySQL query error");
 142          
 143          //clear cache table

 144          $sqlcache = "TRUNCATE TABLE crawlt_cache";
 145          $requetecache = mysql_query($sqlcache, $connexion) or die("MySQL query error");            
 146              
 147          echo"<br><br><p>".$language['update']."</p><br><br>";                
 148              
 149              //continue

 150  
 151          
 152          echo"<form action=\"index.php\" method=\"POST\" >\n";
 153          echo "<input type=\"hidden\" name ='navig' value='6'>\n";
 154          echo"<table class=\"centrer\">\n";    
 155          echo"<tr>\n";
 156          echo"<td colspan=\"2\">\n";
 157          echo"<input name='ok' type='submit'  value='OK ' size='20'>\n";
 158          echo"</td>\n";
 159          echo"</tr>\n";
 160          echo"</table>\n";
 161          echo"</form><br>\n";       
 162          }
 163  
 164      }
 165     
 166  
 167  ?>


Généré le : Thu Sep 6 14:14:11 2007 par Balluche grâce à PHPXref 0.7