[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <? 2 //==================================================================================== 3 // OCS INVENTORY REPORTS 4 // Copyleft Pierre LEMMET 2005 5 // Web: http://ocsinventory.sourceforge.net 6 // 7 // This code is open source and may be copied and modified as long as the source 8 // code is always made freely available. 9 // Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt 10 //==================================================================================== 11 //Modified on 12/13/2005 12 13 error_reporting(E_ALL & ~E_NOTICE); 14 set_time_limit(0); 15 16 @session_start(); 17 18 include ("preferences.php"); 19 20 // Ajout Se3 pour l'authentification 21 require_once("config.inc.php"); 22 require_once("functions.inc.php"); 23 $login =isauth(); 24 25 //aide 26 $_SESSION["pageaide"]="L%27inventaire#Nouvelle_version_.28.3E_1.0_ocsinventory-NG.29"; 27 28 // Si pas se3_is_admin 29 if ((ldap_get_right("se3_is_admin",$login)=="Y") || (ldap_get_right("computers_is_admin",$login)=="Y") || (ldap_get_right("inventaire_can_read",$login)=="Y") || (ldap_get_right("parc_can_manage",$login)=="Y")) { 30 print "<H3 ALIGN=RIGHT><FONT color=#6699cc>Bonjour $login (niveau "; 31 $intlevel=getintlevel(); 32 switch ($intlevel) { 33 case 1: 34 echo gettext("Débutant"); 35 break; 36 case 2: 37 echo gettext("Intermédiaire"); 38 break; 39 case 3: 40 echo gettext("Confirmé"); 41 break; 42 case 4: 43 echo gettext("Expérimental"); 44 break; 45 } 46 echo ")</FONT></H3>"; 47 48 // On se reconnecte à ocsweb 49 dbconnect(); 50 // update checking 51 /*$resUpd = @mysql_query("SELECT tvalue FROM config WHERE name='GUI_VERSION'", $_SESSION["readServer"]) or die(mysql_error($_SESSION["readServer"])); 52 $valUpd = @mysql_fetch_array($resUpd); 53 if( !$valUpd || $valUpd["tvalue"]<GUI_VER ) { 54 $fromAuto = true; 55 include('install.php'); 56 die(); 57 }// 58 59 //if(isset($_GET["logout"])) { 60 foreach( $_SESSION as $key=>$val) { 61 unset($_SESSION[$key]); 62 } 63 //} 64 */ 65 if( isset($_GET["first"] )) { 66 unset( $_SESSION["lareq"] ); 67 unset( $_SESSION["lareqpages"] ); 68 } 69 70 71 ?> 72 <html> 73 <head> 74 <TITLE>OCS Inventory</TITLE> 75 <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 76 <META HTTP-EQUIV="Expires" CONTENT="-1"> 77 <LINK REL='StyleSheet' TYPE='text/css' HREF='css/ocsreports.css'> 78 <? incPicker(); ?> 79 <script language='javascript'> 80 <?if($_GET["multi"] == 3 && $_GET["mode"] == 1) {?> 81 function scrollHeaders() { 82 var monSpan = document.getElementById("headers"); 83 if( document.body.scrollTop > 200) { 84 monSpan.style.top = (( Math.ceil(document.body.scrollTop / 27)) * 27) + 3<? 85 if( getBrowser() == "MOZ" ) 86 echo " - 17 + 27;\n"; 87 ?> 88 monSpan.style.visibility = 'visible'; 89 // 15 Netsc 8ie 90 } 91 else 92 monSpan.style.visibility = 'hidden'; 93 } 94 <?}?> 95 96 function wait( sens ) { 97 var mstyle = document.getElementById('wait').style.display = (sens!=0?"block" :"none"); 98 } 99 100 </script> 101 </head> 102 <STYLE> 103 body{ 104 background: url(/elements/images/fond_SE3.png) ghostwhite bottom right no-repeat fixed; 105 } 106 </STYLE> 107 108 <? 109 echo "<body bottommargin='0' leftmargin='0' topmargin='0' rightmargin='0' marginheight='0' marginwidth='0'"; 110 if( $_GET["multi"] ==3 && $_GET["mode"] == 1) { 111 echo " OnScroll='javascript:scrollHeaders()'"; 112 if( getBrowser()=="MOZ") 113 echo " OnMouseMove='javascript:scrollHeaders()'"; 114 } 115 echo ">"; 116 117 /* se3 118 if( !isset($_GET["popup"] )) { 119 ?> 120 <table class='headfoot' border='0'> 121 <tr height=25px> 122 <td><a href='index.php?first'><img src='image/logo OCS-ng-48.png'></a></td> 123 <td align='center' width='33%'><a href='index.php?first'><img src=image/banner-ocs.png></a></td><td width='33%' align='right'> 124 <b>Ver. <?=GUI_VER?>   </b> 125 <? 126 } 127 */ 128 /* se3 if(isset($_POST["subLogin"])) { 129 $req="SELECT id, accesslvl, passwd FROM operators WHERE id='".$_POST["login"]."'"; 130 131 $res=mysql_query($req,$_SESSION["readServer"]) or die(mysql_error()); 132 133 if($row=@mysql_fetch_object($res)) 134 { 135 // DL 25/08/2005 136 // Support new MD5 encrypted password or old clear password for login only 137 if (($row->passwd != md5( $_POST["pass"])) and 138 ($row->passwd != $_POST["pass"])) { 139 $err = "</tr></table><br><center><font color=red><b>".$l->g(216)."</b></font></center>"; 140 unset($_SESSION["loggeduser"],$_SESSION["lvluser"]); 141 } 142 else { 143 */ 144 // $_SESSION["loggeduser"]=$row->id; 145 // $_SESSION["lvluser"]=$row->accesslvl; 146 147 $_SESSION["loggeduser"]="$login"; 148 $_SESSION["lvluser"]=1; 149 150 151 /*se3 } 152 } 153 else 154 { 155 $err = "</tr></table><br><center><font color=red><b>".$l->g(180)."</b></font></center>"; 156 unset($_SESSION["loggeduser"],$_SESSION["lvluser"]); 157 } 158 } 159 160 if ( !isset($_SESSION["loggeduser"]) && $dir = @opendir("languages")) { 161 while($filename = readdir($dir)) { 162 if( strstr ( $filename, ".txt") === false) 163 continue; 164 $langue = basename ( $filename,".txt"); 165 echo "<a title='$langue' href=\"index.php?av=1&multi=".$_GET["multi"]."&c=".$_GET["c"]."&a=".$_GET["a"]."&lang=$langue\"><img src =\"languages/$langue.png\" width=\"20\" height=\"15\"></a> "; 166 } 167 closedir($dir); 168 } 169 170 if( isset($err) ) 171 echo $err; 172 173 if(isset($_SESSION["loggeduser"]) && !isset($_GET["popup"])) 174 echo "</td></tr><tr align=center><td align='center' colspan='3'> <a href=?logout><font color=black><u>".$l->g(251)."</u></font></a> <a href=index.php?multi=11><font color=black><u>".$l->g(236)."</u></font></a></td>"; 175 176 echo "</tr></table>"; 177 178 if(!isset($_SESSION["loggeduser"])) 179 { 180 echo "<br><form name=log action=index.php method=post> 181 <table BORDER='0' WIDTH = '35%' ALIGN = 'Center' CELLPADDING='0' BORDERCOLOR='#9894B5'> 182 <tr> 183 <td><b>".$l->g(24).":</b></td> 184 <td><input name=login type=input size=15></td> 185 </tr> 186 <tr> 187 <td><b>".$l->g(217).":</b></td> 188 <td><input name=pass type=password size=15></td> 189 </tr> 190 <tr> 191 <td> </td> 192 <td><input name=subLogin type=submit value=".$l->g(13)."></td> 193 </tr> 194 </table> 195 </form> 196 "; 197 include ("footer.php"); 198 die(); 199 200 } 201 202 $limitedAccess = array(2,3,4,5,6,7,8,9,14,13,22,23,24,27,20,21,26); 203 if( in_array($_GET["multi"],$limitedAccess) && $_SESSION["lvluser"]!=1) { 204 echo "<br><br><center><b><font color=red>ACCESS DENIED</font></b></center><br>"; 205 unset($_GET["multi"]); 206 die(); 207 } 208 */ 209 210 } 211 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |