~
Advanced Hosters -

Xruman
: 05.08.2008
: 1208
# : 02, 2009 10:58 am
. , . , , .. - , SOFT FX. . _index.shtml

:
<?
include("admin/config.inc.php");
error_reporting($error);
$request_a = explode("/",$request);
foreach($request_a as $key=>$value){
   $i++;
   $urls[$i] = $value;
}
for($n=1;$n<$i;$n++){
    if(getIdByHref($urls[$n]) == ""){
      $object_id = 3;
      header("HTTP/1.0 404 Not Found");
   }else{
      $object_id = getIdByHref($urls[$n]);
   }
}
if($object_id != 3){
   if($action != "exit"){
      $lgn = new Login;
      $lgn->checkLogin($user_login, $user_password);
      if($lgn->auth == 1){
         $UDATA['auth'] = $lgn->auth;
         $UDATA['login'] = $lgn->ULOGIN;
         $UDATA['password'] = $lgn->UPASSWORD;
         $UDATA['UID'] = $lgn->UID;
         $UDATA['name'] = $lgn->NAME;
         $UDATA['surname'] = $lgn->SURNAME;
      }
      $access = $lgn->getAccessForObject($object_id, $UDATA['UID'], 0);
      if($access == "denied"){
         $object_id = 6;
      }
   }
}

$NYear = $year;
$NMonth = $month;

if($request == ""){$object_id = "1";}
if($mode == "sysinfo"){
   echo"<table style=\"font:8pt Verdana,sans-serif;\" border=1 bgcolor=white align=center>
      <tr><td colspan=2><b> </b></td></tr>
      <tr><td></td><td>$request</td></tr>
      <tr><td></td><td>$ID</td></tr>
      <tr><td> (.)</td><td>$year.$month</td></tr>
      <tr><td> ()</td><td>$brand</td></tr>
      <tr><td></td><td>$mode</td></tr>
      <tr><td> (ID)</td><td>$object_id</td></tr>
      <tr><td></td><td>".$lgn->auth."</td></tr>
      <tr><td> </td><td>".$lgn->auth_message."</td></tr>
      <tr><td> </td><td>".$access." &nbsp;</td></tr>
      <tr><td> :</td><td>ID: ".$UDATA['UID']."<br>: ".$lgn->ULOGIN."<br>: ***</td></tr>
   </table>".
   $_COOKIE['UDATA']['login'];
   phpinfo(32);
}
else{
   $xml = createXML($object_id, $NYear, $NMonth, $ID,$_GET,$_POST,$brand, $UDATA, $print);
}
if($mode == "xml"){
   $filename = $ROOT_DIR."$TMPL_DIR/xml.xsl";
}
else{
   if($print == "yes"){
      $filename = $ROOT_DIR."$TMPL_DIR/print.xsl";
   }else{
      $result = mysql_query("SELECT object_template FROM $_OBJ WHERE object_id = '$object_id' LIMIT 1",$db);
      $a = mysql_fetch_row($result);
      $resulttmp = mysql_query("SELECT * FROM $_TMPL WHERE template_id='$a[0]'",$db);
      $datat = mysql_fetch_array($resulttmp);
      $xslt_file = $datat['template_file'];
      $filename = $ROOT_DIR."$TMPL_DIR/".$xslt_file;
   }
}
$OUTDATA = xml2html($xml, $filename);
print($OUTDATA);
?>



- (
html, shtml, php , . files , , . ...
, ... ...
    ~