[ PHPXref.com ] [ Generated: Sun Jul 20 19:31:32 2008 ] [ phpAdsNew 2.0.8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/admin/ -> maintenance-updates.php (source)

   1  <?php // $Revision: 2.0.2.5 $
   2  
   3  /************************************************************************/
   4  /* phpAdsNew 2                                                          */
   5  /* ===========                                                          */
   6  /*                                                                      */
   7  /* Copyright (c) 2000-2006 by the phpAdsNew developers                  */
   8  /* For more information visit: http://www.phpadsnew.com                 */
   9  /*                                                                      */
  10  /* This program is free software. You can redistribute it and/or modify */
  11  /* it under the terms of the GNU General Public License as published by */
  12  /* the Free Software Foundation; either version 2 of the License.       */
  13  /************************************************************************/
  14  
  15  
  16  
  17  // Include required files
  18  require  ("config.php");
  19  require  ("lib-maintenance.inc.php");
  20  
  21  if (!defined('LIBUPDATES_INCLUDED'))    require  ("lib-updates.inc.php");
  22  
  23  
  24  // Security check
  25  phpAds_checkAccess(phpAds_Admin);
  26  
  27  
  28  
  29  /*********************************************************/
  30  /* HTML framework                                        */
  31  /*********************************************************/
  32  
  33  // Check for previously downloaded info
  34  if (isset($Session['update_check']) && $Session['update_check'])
  35  {
  36      phpAds_SessionDataRegister('maint_update', $Session['update_check']);
  37      phpAds_SessionDataRegister('update_check', false);
  38      
  39      phpAds_SessionDataStore();
  40  }
  41  
  42  phpAds_PageHeader("5.4");
  43  phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2"));
  44  
  45  
  46  
  47  /*********************************************************/
  48  /* Main code                                             */
  49  /*********************************************************/
  50  
  51  
  52  // Determine environment
  53  $current  = $strCurrentlyUsing.' '.$phpAds_productname.'&nbsp;'.$phpAds_version_readable.' ';
  54  $current .= $strRunningOn.' ';
  55  
  56  if (isset($HTTP_SERVER_VARS["SERVER_SOFTWARE"]) && strlen(trim($HTTP_SERVER_VARS["SERVER_SOFTWARE"])))
  57      $current .= str_replace('/', '&nbsp;', ereg_replace(" .*$", '', $HTTP_SERVER_VARS["SERVER_SOFTWARE"]));
  58  else
  59      $current .= $strUnknown;
  60      
  61  $current .= ', '.'PHP&nbsp;'.phpversion().' '.$strAndPlain.' '.$phpAds_dbmsname;
  62  
  63  $res = phpAds_dbQuery("SELECT VERSION() AS version");
  64  if ($row = phpAds_dbFetchArray($res))
  65      $current .= '&nbsp;'.$row['version'];
  66  
  67  $current .= '.';
  68  
  69  if (!isset($Session['maint_update']))
  70  {
  71      if (function_exists('xml_parser_create'))
  72      {
  73          // Show wait please text with rotating logo
  74          echo "<br>";
  75          echo "<table border='0' cellspacing='1' cellpadding='2'><tr><td>";
  76          echo "<img src='images/install-busy.gif' width='16' height='16'>";
  77          echo "</td><td class='install'>".$strSearchingUpdates."</td></tr></table>";
  78          
  79          phpAds_PageFooter();
  80          
  81          // Send the output to the browser
  82          flush();
  83          
  84          // Get updates info and store them into a session var
  85          $res = phpAds_checkForUpdates();
  86          
  87          phpAds_SessionDataRegister('maint_update', $res);
  88          phpAds_SessionDataStore();
  89          
  90          echo "<script language='JavaScript'>\n";
  91          echo "<!--\n";
  92          echo "document.location.replace('maintenance-updates.php');\n";
  93          echo "//-->\n";
  94          echo "</script>\n";
  95          
  96          exit;
  97      }
  98      else
  99      {
 100          echo "<br>".$strNotAbleToCheck."<br><br>";
 101          phpAds_ShowBreak();
 102          echo $current;
 103          echo "<br><br>".$strForUpdatesLookOnWebsite."<br><br>";
 104          echo "<b><img src='images/caret-r.gif'>&nbsp;<a href='http://".$phpAds_producturl."' target='_blank'>".$strClickToVisitWebsite."</a></b>"; 
 105      }
 106  }
 107  else
 108  {
 109      $maint_update = $Session['maint_update'];
 110      unset($Session['maint_update']);
 111      phpAds_SessionDataStore();
 112      
 113      if ($maint_update[0] > 0 && $maint_update[0] != 800)
 114          phpAds_Die ($strErrorOccurred, $strUpdateServerDown);
 115      
 116      echo "<br><br>";
 117      
 118      if ($maint_update[0] == 800)
 119      {
 120          echo "<table border='0' cellspacing='0' cellpadding='0'><tr><td width='24' valign='top'>";
 121          echo "<img src='images/info.gif'>&nbsp;&nbsp;";
 122          echo "</td><td valign='top'><b>".$strNoNewVersionAvailable."</b>";
 123          echo '<br><br>'.$current;
 124          echo "</td></tr></table><br>";
 125          phpAds_ShowBreak();
 126      }
 127      elseif (is_array($maint_update[1]))
 128      {
 129          echo "<table border='0' cellspacing='0' cellpadding='0'><tr><td width='24' valign='top'>";
 130          
 131          if ($maint_update[1]['security_fix'] == 1)
 132          {
 133              echo "<img src='images/error.gif'>&nbsp;&nbsp;";
 134              echo "</td><td valign='top'>".$strSecurityUpdate;
 135          }
 136          else
 137          {
 138              echo "<img src='images/info.gif'>&nbsp;&nbsp;";
 139              echo "</td><td valign='top'>".$strNewVersionAvailable;
 140          }
 141          
 142          echo '<br><br>'.$current;
 143          
 144          echo "</td></tr></table>";
 145          echo "<br>";
 146          phpAds_ShowBreak();
 147          
 148          
 149          echo "<br><br>";
 150          echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";    
 151          echo "<tr height='25'><td height='25'>&nbsp;&nbsp;<b>".$strAvailableUpdates."</b></td></tr>";
 152          
 153          echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
 154          echo "<tr height='25' bgcolor='#F6F6F6'><td height='25' valign='top' nowrap>";
 155          
 156          echo "<br>&nbsp;&nbsp;<img src='images/icon-setup.gif' align='absmiddle'>&nbsp;";
 157          echo $phpAds_productname." ".$maint_update[1]['config_readable']."</td>";
 158          
 159          echo "<td width='32'>&nbsp;</td>";
 160          echo "<td><br>".$maint_update[1]['description']."<br><br>";
 161          echo "</td>";
 162          
 163          echo "<td width='32'>&nbsp;</td>";
 164          echo "</tr>";
 165          
 166          if ($maint_update[1]['url_zip'] != '' || $maint_update[1]['url_tgz'] != '')
 167          {
 168              echo "<tr height='1'><td colspan='2' bgcolor='#F6F6F6'><img src='images/spacer.gif' height='1' width='100%'>";
 169              echo "<td colspan='2' bgcolor='#888888'><img src='images/break-el.gif' height='1' width='100%'></td></tr>";
 170              echo "<tr height='25' bgcolor='#F6F6F6'><td height='25' colspan='2'>&nbsp;&nbsp;</td><td>";
 171              
 172              if ($maint_update[1]['url_zip'] != '')
 173              {
 174                  echo "<img src='images/icon-filetype-zip.gif' align='absmiddle'>&nbsp;";
 175                  echo "<a href='".$maint_update[1]['url_zip']."'>".$strDownloadZip."</a>";
 176                  
 177                  if ($maint_update[1]['url_tgz'] != '')
 178                      echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 179              }
 180              
 181              if ($maint_update[1]['url_tgz'] != '')
 182              {
 183                  echo "<img src='images/icon-filetype-zip.gif' align='absmiddle'>&nbsp;";
 184                  echo "<a href='".$maint_update[1]['url_tgz']."'>".$strDownloadGZip."</a>";
 185              }
 186              
 187              echo "</td><td>&nbsp;</td></tr>";
 188          }
 189          
 190          echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
 191          echo "</table>";
 192      }
 193      else
 194          phpAds_Die ($strErrorOccurred, $strUpdateServerDown);
 195  }
 196  
 197  
 198  
 199  /*********************************************************/
 200  /* HTML framework                                        */
 201  /*********************************************************/
 202  
 203  phpAds_PageFooter();
 204  
 205  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]