| [ PHPXref.com ] | [ Generated: Sun Jul 20 17:56:38 2008 ] | [ Gazie 2.0.11 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /* $Id: funlib.inc,v 1.22 2006/07/03 06:01:00 devincen Exp $ 3 -------------------------------------------------------------------------- 4 Gazie - Gestione Azienda 5 Copyright (C) 2004-2005 - Antonio De Vincentiis Montesilvano (PE) 6 (info@devincentiis.it) 7 <http://gazie.sourceforge.net> 8 -------------------------------------------------------------------------- 9 Questo programma e` free software; e` lecito redistribuirlo e/o 10 modificarlo secondo i termini della Licenza Pubblica Generica GNU 11 come e` pubblicata dalla Free Software Foundation; o la versione 2 12 della licenza o (a propria scelta) una versione successiva. 13 14 Questo programma e` distribuito nella speranza che sia utile, ma 15 SENZA ALCUNA GARANZIA; senza neppure la garanzia implicita di 16 NEGOZIABILITA` o di APPLICABILITA` PER UN PARTICOLARE SCOPO. Si 17 veda la Licenza Pubblica Generica GNU per avere maggiori dettagli. 18 19 Ognuno dovrebbe avere ricevuto una copia della Licenza Pubblica 20 Generica GNU insieme a questo programma; in caso contrario, si 21 scriva alla Free Software Foundation, Inc., 675 Mass Ave, 22 Cambridge, MA 02139, Stati Uniti. 23 -------------------------------------------------------------------------- 24 */ 25 26 session_cache_limiter('nocache'); 27 session_start(); 28 29 // ricavo la dir per il path assoluto 30 // aggiungo root/root per evitare il Warning in caso della radice: 31 $nomescript = dirname($_SERVER['SCRIPT_NAME']).'/root/root'; 32 list($nouse, $nameradi, $name1sub, $module) = split("/", $nomescript); 33 34 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 35 setlocale (LC_TIME, 'it'); 36 } else { 37 setlocale (LC_TIME, 'it_IT'); 38 } 39 40 // funzione che controlla se l'azienda e' stata configurata 41 function checkaziend() 42 { 43 global $aziend_table; 44 $config = getRow($aziend_table,"codice","1"); 45 return $config; 46 } 47 48 function gaz_format_number($number) 49 { 50 return number_format($number, 2, ',', '.'); 51 } 52 53 function CalcolaImportoRigo($quantita, $prezzo, $sconto) 54 { 55 return round($quantita * ($prezzo - $prezzo * $sconto/100),2); 56 //se si vuole usare continuare ad usare il vecchio calcolo perche' si e' gia' in produzione allora si deve sostituire con: 57 // <<< return number_format($quantita * ($prezzo - $prezzo * $sconto/100), 2, ',', '.'); >>> 58 } 59 60 //=============================================================================== 61 // classe generica per la generazione di select box 62 //================================================================================ 63 class SelectBox 64 { 65 var $name; 66 // assegno subito il nome della select box 67 function SelectBox($name) 68 { 69 $this -> name = $name; 70 } 71 72 function setSelected($selected) 73 { 74 $this->selected = $selected; 75 } 76 77 function addSelected($selected) 78 { 79 $this->setSelected($selected); 80 } 81 82 function output($query, $index1, $empty=False, $bridge='', $index2='') 83 { 84 print "\t <select name=\"$this->name\" class=\"FacetSelect\">\n"; 85 if ($empty) { 86 print "\t\t <option value=\"\"></option>\n"; 87 } 88 $result = dbms_query($query); 89 while ($a_row = dbms_fetch_array($result)) { 90 $selected = ""; 91 if($a_row["codice"] == $this->selected) { 92 $selected = "selected"; 93 } 94 if ($index2 == '') { 95 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".substr($a_row[$index1],0,43)."</option>\n"; 96 } else { 97 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".substr($a_row[$index1],0,28).$bridge.substr($a_row[$index2],0,15)."</option>\n"; 98 } 99 } 100 print "\t </select>\n"; 101 } 102 } 103 104 // classe per la generazione di select box dei clienti,fornitori,conti 105 class selectclfoco extends SelectBox 106 { 107 function output($mastro,$cerca) 108 { 109 global $clfoco_table; 110 $messaggio = ""; 111 $tabula = " tabindex=\"1\" "; 112 if (strlen($cerca) >= 2) { 113 $mascon=$mastro.'000000'; 114 $result = dynQuery("*", $clfoco_table,"codice LIKE '$mastro%' AND codice > '$mascon' AND ragso1 LIKE '$cerca%'","ragso1 Desc"); 115 $numclfoco = dbms_num_rows($result); 116 if ($numclfoco > 0) { 117 $tabula =" "; 118 print "\t <select name=\"$this->name\" class=\"FacetSelect\">\n"; 119 while ($a_row = dbms_fetch_array($result)) { 120 $selected = ""; 121 if($a_row["codice"] == $this->selected) { 122 $selected = "selected"; 123 } 124 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".$a_row["ragso1"]." ".$a_row["citspe"]."</option>\n"; 125 } 126 print "\t </select>\n"; 127 } else { 128 $messaggio = "Non è stato trovato nulla!"; 129 } 130 } else { 131 $messaggio = "Inserire min. 2 caratteri!"; 132 } 133 print "\t<td><input type=\"text\" name=\"ragso1\" ".$tabula." accesskey=\"e\" value=\"".stripslashes($cerca)."\" maxlength=\"15\" size=\"9\" class=\"FacetInput\">\n"; 134 print $messaggio; 135 print "\t <input type=\"image\" align=\"middle\" accesskey=\"c\" ".$tabula." name=\"clfoco\" src=\"../../images/cerbut.gif\"></td>\n"; 136 } 137 } 138 // classe per la generazione di select box dei clienti e fornitori (partner commerciali) 139 class SelectPartner extends SelectBox 140 { 141 function output($mastro,$cerca) 142 { 143 $messaggio = ""; 144 $tabula = " tabindex=\"1\" "; 145 if (strlen($cerca) >= 2) { 146 $mascon = $mastro.'000000'; 147 148 $anagrafica = new Anagrafica(); 149 $partners = $anagrafica->queryPartners("*", "codice LIKE '$mastro%' AND codice > '$mascon' AND ragso1 LIKE '$cerca%' and status <> 'HIDDEN'","ragso1 Desc"); 150 151 $numclfoco = sizeof($partners); 152 153 if ($numclfoco > 0) { 154 $tabula =" "; 155 print "\t <select name=\"$this->name\" class=\"FacetSelect\">\n"; 156 while (list($key, $a_row) = each($partners)) { 157 $selected = ""; 158 if($a_row["codice"] == $this->selected) { 159 $selected = "selected"; 160 } 161 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".$a_row["ragso1"]." ".$a_row["citspe"]."</option>\n"; 162 } 163 print "\t </select>\n"; 164 } else { 165 $messaggio = "Non è stato trovato nulla!"; 166 } 167 } else { 168 $messaggio = "Inserire min. 2 caratteri!"; 169 } 170 print "\t<input type=\"text\" name=\"ragso1\" ".$tabula." accesskey=\"e\" value=\"".stripslashes($cerca)."\" maxlength=\"15\" size=\"9\" class=\"FacetInput\">\n"; 171 print $messaggio; 172 print "\t<input type=\"image\" align=\"middle\" accesskey=\"c\" ".$tabula." name=\"clfoco\" src=\"../../images/cerbut.gif\">\n"; 173 } 174 } 175 176 // classe per la generazione di select box degli articoli 177 class selectartico extends SelectBox 178 { 179 function output($cerca) 180 { 181 global $artico_table; 182 $messaggio = ""; 183 $tabula = " tabindex=\"4\" "; 184 if (strlen($cerca) >= 1) { 185 $result = dynQuery("*", $artico_table,"codice LIKE '$cerca%'","descri DESC"); 186 $numclfoco = dbms_num_rows($result); 187 if ($numclfoco > 0) { 188 $tabula = ""; 189 print "\t <select tabindex=\"4\" name=\"$this->name\" class=\"FacetSelect\">\n"; 190 while ($a_row = dbms_fetch_array($result)) { 191 $selected = ""; 192 if($a_row["codice"] == $this->selected) { 193 $selected = "selected"; 194 } 195 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".$a_row["codice"]."-".$a_row["descri"]."</option>\n"; 196 } 197 print "\t </select>\n"; 198 } else { 199 $messaggio = "Non è stato trovato nulla!"; 200 } 201 } else { 202 $messaggio="Almeno 1 carattere!"; 203 } 204 print "\t<input type=\"text\" name=\"cosear\" value=\"".stripslashes($cerca)."\" ".$tabula." maxlength=\"15\" size=\"9\" class=\"FacetInput\">\n"; 205 print $messaggio; 206 print "\t<input type=\"image\" align=\"middle\" accesskey=\"c\" name=\"artico\" ".$tabula." src=\"../../images/cerbut.gif\" >\n"; 207 } 208 } 209 210 // classe per la generazione di select box dei conti ricavi di vendita 211 class selectconven extends SelectBox 212 { 213 function output($mastri) 214 { 215 global $gTables; 216 $query = 'SELECT * FROM `'.$gTables['clfoco_table']."` WHERE codice LIKE '".$mastri."%' AND codice > '".$mastri."000000%' ORDER BY `codice` ASC"; 217 SelectBox::output($query, 'codice', False, '-', 'ragso1'); 218 } 219 } 220 221 // classe per la generazione di select box banche d'appoggio 222 class selectbanapp extends SelectBox 223 { 224 function output() 225 { 226 global $gTables; 227 $query = 'SELECT * FROM `'.$gTables['banapp_table'].'` ORDER BY `descri`'; 228 SelectBox::output($query, 'descri', True, ' ', 'locali'); 229 } 230 } 231 232 // classe per la generazione di select box dei pagamenti 233 class selectpagame extends SelectBox 234 { 235 function output() 236 { 237 global $gTables; 238 $query = 'SELECT * FROM `'.$gTables['pagame_table'].'` ORDER BY `codice`'; 239 SelectBox::output($query, 'descri'); 240 } 241 } 242 243 // classe per la generazione di select box delle aliquote iva 244 class selectaliiva extends SelectBox 245 { 246 function output() 247 { 248 249 global $gTables; 250 251 $query = 'SELECT * FROM `'.$gTables['aliiva_table'].'` ORDER BY `codice`'; 252 253 SelectBox::output($query, 'descri', True); 254 } 255 } 256 257 // classe per la generazione di select box delle categorie merceologiche 258 class selectcatmer extends SelectBox 259 { 260 function output() 261 { 262 global $gTables; 263 $query = 'SELECT * FROM `'.$gTables['catmer_table'].'` ORDER BY `codice`'; 264 SelectBox::output($query, 'codice', True, '-', 'descri'); 265 } 266 } 267 268 // classe per la generazione di select box porto resa 269 class selectportos extends SelectBox 270 { 271 function output() 272 { 273 global $gTables; 274 $query = 'SELECT * FROM `'.$gTables['portos_table'].'` ORDER BY `codice`'; 275 SelectBox::output($query, 'codice', True, '-', 'descri'); 276 } 277 } 278 279 // classe per la generazione di select box delle spedizioni 280 class selectspediz extends SelectBox 281 { 282 function output() 283 { 284 global $gTables; 285 $query = 'SELECT * FROM `'.$gTables['spediz_table'].'` ORDER BY `codice`'; 286 SelectBox::output($query, 'codice', True, '-', 'descri'); 287 } 288 } 289 290 // classe per la generazione di select box imballi 291 class selectimball extends SelectBox 292 { 293 function output() 294 { 295 global $gTables; 296 $query = 'SELECT * FROM `'.$gTables['imball_table'].'` ORDER BY `codice`'; 297 SelectBox::output($query, 'codice', True, '-', 'descri'); 298 } 299 } 300 301 // classe per la generazione di select box imballi, spedizioni, porto resa 302 class SelectValue extends SelectBox 303 { 304 function output($table, $fieldName) 305 { 306 // 'spediz_table' 'portos_table' 'imball_table' 307 // $fieldName - il nome del campo da impostare 308 global $gTables; 309 $query = 'SELECT * FROM `'.$gTables[$table].'` ORDER BY `codice`'; 310 $index1 = 'codice'; 311 $empty = True; 312 $bridge = ' '; 313 $index2 = 'descri'; 314 print "\t <select name=\"$this->name\" class=\"FacetSelect\" onChange=\"pulldown_menu('".$this->name."','".$fieldName."')\" style=\"width: 20px\">\n"; 315 //print "\t <select name=\"$this->name\" class=\"FacetSelect\" onChange=\"pulldown_menu('".$this->name."','".$fieldName."')\" style=\"width: 80px\">\n"; 316 if ($empty) { 317 print "\t\t <option value=\"\"></option>\n"; 318 } 319 $result = dbms_query($query); 320 while ($a_row = dbms_fetch_array($result)) { 321 if ($index2 == '') { 322 print "\t\t <option value=\"\">".$a_row[$index1]."</option>\n"; 323 } else { 324 print "\t\t <option value=\"".$a_row[$index2]."\"> ".$a_row[$index1].$bridge.$a_row[$index2]."</option>\n"; 325 //print "\t\t <option value=\"".$a_row[$index2]."\">".$a_row[$index2]."</option>\n"; 326 } 327 } 328 print "\t </select>\n"; 329 } 330 } 331 332 // classe per la generazione di select box vettori 333 class selectvettor extends SelectBox 334 { 335 function output() 336 { 337 global $vettor_table; 338 print "\t <select name=\"$this->name\" class=\"FacetSelect\">\n"; 339 print "\t\t <option value=\"\"></option>\n"; 340 $result = dynQuery("*", $vettor_table,1,"codice"); 341 while ($a_row = dbms_fetch_array($result)) { 342 $selected = ""; 343 if($a_row["codice"] == $this->selected) { 344 $selected = "selected"; 345 } 346 print "\t\t <option value=\"".$a_row["codice"]."\" $selected >".substr($a_row["descri"],0,22)."</option>\n"; 347 } 348 print "\t </select>\n"; 349 } 350 } 351 352 // classe per la generazione dinamica di select box per le date 353 class selectDate 354 { 355 // le proprieta' sono i nomi dei select e i tag "selected" sulle option 356 var $giorno; 357 var $mese; 358 var $anno; 359 var $dayselected; 360 var $monthselected; 361 var $yearselected; 362 // assegno subito il nome delle select box 363 function selectDate($giorno, $mese, $anno) 364 { 365 $this -> giorno = $giorno; 366 $this -> mese = $mese; 367 $this -> anno = $anno; 368 } 369 370 function daySelected($selected) 371 { 372 if (!$selected) { 373 $selected = strftime("%d"); 374 } 375 $this->dayselected = $selected; 376 } 377 378 function monthSelected($selected) 379 { 380 if (!$selected) { 381 $selected = strftime("%m"); 382 } 383 $this->monthselected = $selected; 384 } 385 386 function yearSelected($selected) 387 { 388 if (!$selected) { 389 $selected = strftime("%Y"); 390 } 391 $this->yearselected = $selected; 392 } 393 394 function output() 395 { 396 // select del giorno 397 print "\t <select name=\"$this->giorno\" class=\"FacetSelect\">\n"; 398 for( $counter = 1; $counter <= 31; $counter++ ) { 399 $selected = ""; 400 if($counter == $this->dayselected) { 401 $selected = "selected"; 402 } 403 print "\t\t <option value=\"$counter\" $selected >$counter</option>\n"; 404 } 405 print "\t </select>\n"; 406 // select del mese 407 print "\t <select name=\"$this->mese\" class=\"FacetSelect\">\n"; 408 for( $counter = 1; $counter <= 12; $counter++ ) { 409 $selected = ""; 410 if($counter == $this->monthselected) { 411 $selected = "selected"; 412 } 413 $nome_mese = ucwords(strftime("%B", mktime (0,0,0,$counter,1,0))); 414 print "\t\t <option value=\"$counter\" $selected >$nome_mese</option>\n"; 415 } 416 print "\t </select>\n"; 417 // select del anno 418 print "\t <select name=\"$this->anno\" class=\"FacetSelect\">\n"; 419 for( $counter = 1920; $counter <= 2030; $counter++ ) { 420 $selected = ""; 421 if($counter == $this->yearselected) { 422 $selected = "selected"; 423 } 424 print "\t\t <option value=\"$counter\" $selected >$counter</option>\n"; 425 } 426 print "\t </select>\n"; 427 } 428 function outputMA() 429 { 430 // select del mese 431 print "\t <select name=\"$this->mese\" class=\"FacetSelect\">\n"; 432 for( $counter = 1; $counter <= 12; $counter++ ) { 433 $selected = ""; 434 if($counter == $this->monthselected) { 435 $selected = "selected"; 436 } 437 $nome_mese = ucwords(strftime("%B", mktime (0,0,0,$counter,1,0))); 438 print "\t\t <option value=\"$counter\" $selected >$nome_mese</option>\n"; 439 } 440 print "\t </select>\n"; 441 // select del anno 442 print "\t <select name=\"$this->anno\" class=\"FacetSelect\">\n"; 443 for( $counter = 2002; $counter <= 2030; $counter++ ) { 444 $selected = ""; 445 if($counter == $this->yearselected) { 446 $selected = "selected"; 447 } 448 print "\t\t <option value=\"$counter\" $selected >$counter</option>\n"; 449 } 450 print "\t </select>\n"; 451 } 452 function outputAN() 453 { 454 // select del anno 455 print "\t <select name=\"$this->anno\" class=\"FacetSelect\">\n"; 456 for( $counter = 2000; $counter <= 2030; $counter++ ) { 457 $selected = ""; 458 if($counter == $this->yearselected) { 459 $selected = "selected"; 460 } 461 print "\t\t <option value=\"$counter\" $selected >$counter</option>\n"; 462 } 463 print "\t </select>\n"; 464 } 465 } 466 467 /* SEZIONE PER L'ORDINAMENTO DEI RECORD IN OUTPUT */ 468 /* SONO IMPOSTATE TUTE LE VARIABILI NECESSARIE ALLA FUNZIONE dynQuery */ 469 // imposto le variabili di sessione con i valori di default 470 if (!isset ($_GET['flag_order'])) { 471 $flag_order=''; 472 $flagorpost=''; 473 } 474 if (!isset ($_GET['auxil'])) { 475 $auxil = "1"; 476 } 477 if (!isset ($limit)) { 478 $limit = "0"; 479 } 480 if (!isset ($passo)) { 481 $passo = "20"; 482 } 483 if (!isset ($field)) { 484 $field = "2" ; 485 } 486 //flag di ordinamento ascendente e discendente 487 if (isset ($_GET['flag_order']) && ($_GET['flag_order'] == "DESC")) { 488 $flag_order="ASC"; 489 $flagorpost="DESC"; 490 } elseif (isset ($_GET['flag_order']) && ($_GET['flag_order'] <> "DESC")) { 491 $flag_order="DESC"; 492 $flagorpost="ASC"; 493 } 494 // se $PHP_SELF e' compreso nel referer (ricaricamento dalla stessa pagina), conservo tutte le variabili di 495 // sessione, altrimenti resetto $session['field'], $session['limit'], $session['passo'], $session['where'] e session['order'] 496 if (!isset($_SERVER["HTTP_REFERER"])) { 497 $_SERVER["HTTP_REFERER"] = ""; 498 } 499 if (!strstr ($_SERVER["HTTP_REFERER"],$_SERVER['PHP_SELF'])) { 500 $field = "2"; // valore che indica alla dynQuery che orderby non va usato 501 $flag_order = "DESC"; // per default i dati piu' recenti sono i primi 502 $limit = "0"; 503 $passo = "20"; 504 $orderby = $field." ".$flag_order; 505 $auxil = "1"; 506 $where = '1'; 507 } 508 // imposto il nuovo campo per l'ordinamento 509 if (isset ($_GET['auxil'])) { 510 $auxil=$_GET['auxil']; 511 } 512 if (isset ($_GET['field'])) { 513 $field=$_GET['field']; 514 } 515 $orderby = $field.' '.$flag_order; 516 if (isset ($_GET['limit'])) { 517 $limit=$_GET['limit']; 518 } 519 // statement where di default = 1 520 if (!isset ($_GET['where'])) { 521 $where = "1"; 522 } else { 523 $where = $_GET['where']; 524 } 525 526 // classe che visualizza i pulsanti per la navigazione dei record 527 // input= tabella, session[where], limit e passo. 528 // calcola i valori da impostare sulla variabile limit per scorrere i record 529 // visualizza il numero totale di record e i pulsanti 530 class recordnav 531 { 532 var $table; 533 var $where; 534 var $limit; 535 var $passo; 536 var $last; 537 function recordnav($table, $where, $limit, $passo) 538 { 539 global $limit, $passo; 540 $this->table = $table; 541 $this->where = $where; 542 $this->limit = $limit; 543 $this->passo = $passo; 544 // faccio il conto totale dei record selezionati dalla query 545 $this->count = queryCount($table, $where); 546 // (recordcount - modulo del numero di record diviso il passo) 547 $this->last = queryCount($table, $where)-(queryCount($table, $where)%$this->passo); 548 //return $last; 549 } 550 551 function output () 552 { 553 global $flagorpost; 554 global $field; 555 global $auxil; 556 $first = 0; 557 $next = $this->limit + $this->passo; 558 $prev = $this->limit - $this->passo; 559 // se e' arrivato a fondo scala imposto il fermo 560 if ($prev <= 0) { 561 $prev = 0; 562 } 563 if ($next >= $this->last) { 564 $next = $this->last; 565 } 566 if ( ($this->count) <= $this->passo ) { 567 // non visualizzo la barra di navigazione dei record 568 print "<div align=\"center\"><font class=\"FacetFormDataFont\">Record trovati $this->count</font></div>"; 569 } else { 570 print "<div align=\"center\"><font class=\"FacetFormDataFont\">Record trovati $this->count</font></div>"; 571 print "<div align=\"center\">"; 572 print "| << <a href=\"".$_SERVER['PHP_SELF']."?field=".$field."&auxil=".$auxil."&flag_order=".$flagorpost."&limit=0\" >Primo</a> "; 573 print "| < <a href=\"".$_SERVER['PHP_SELF']."?field=".$field."&auxil=".$auxil."&flag_order=".$flagorpost."&limit=$prev\">Precedente</a> "; 574 print "| <a href=\"".$_SERVER['PHP_SELF']."?field=".$field."&auxil=".$auxil."&flag_order=".$flagorpost."&limit=$next\">Successivo</a> > "; 575 print "| <a href=\"".$_SERVER['PHP_SELF']."?field=".$field."&auxil=".$auxil."&flag_order=".$flagorpost."&limit=$this->last\">Ultimo</a> >> |"; 576 print "</div>"; 577 } 578 } 579 } 580 581 // classe per la creazione di headers cliccabili per l'ordinamento dei record 582 // accetta come parametro un array associativo composto dalle label e relativi campi del db 583 class linkHeaders 584 { 585 var $headers = array(); // label e campi degli headers 586 function linkHeaders($headers) 587 { 588 $this->headers = $headers; 589 } 590 function output() 591 { 592 global $flag_order; 593 global $auxil; 594 global $headers; 595 foreach($this->headers as $header => $field) { 596 if (!$field == "") { 597 print "\t<th class=\"FacetFieldCaptionTD\"><a href=\"".$_SERVER['PHP_SELF']."?field=".$field."&flag_order=".$flag_order."&auxil=".$auxil."\" title=\"Ordina per ".$header."\">".$header."</a></th>\n\r"; 598 } else { 599 print "\t<th class=\"FacetFieldCaptionTD\">".$header."</th>\n\r"; 600 } 601 } 602 } 603 } 604 605 function cleanMemberSession($abilit, $login, $password, $count) 606 { 607 global $admin_table; 608 $_SESSION["Abilit"] = true; 609 $_SESSION["Login"] = $login; 610 $_SESSION["Password"] = $password; 611 $_SESSION["logged_in"] = true; 612 $count++; 613 $_SESSION["count"] = $count; 614 putRow($admin_table, "Login",$login,"Access",$count); 615 //putRow($admin_table, "Login",$login,"datacc",date("YmdHis")); 616 } 617 618 function checkAdmin($Livaut=0) 619 { 620 global $admin_table, $nameradi, $module; 621 $_SESSION["logged_in"] = false; 622 $_SESSION["Abilit"] = false; 623 if (! isset ($_SESSION["Login"])) { 624 $_SESSION["Login"]= "Null"; 625 } 626 if (checkAccessRights($_SESSION["Login"], $module) == 0) { 627 require_once($_SERVER['DOCUMENT_ROOT']."/".$nameradi."/inc/login_admin.php"); 628 exit; 629 } 630 $club_row = getRow($admin_table, "Login", $_SESSION["Login"]); 631 if ($Livaut > $club_row["Abilit"]) { 632 require_once($_SERVER['DOCUMENT_ROOT']."/".$nameradi."/inc/login_admin.php"); 633 exit; 634 } else { 635 $_SESSION["Abilit"] = true; 636 } 637 638 if (!$club_row || $club_row["Password"] != $_SESSION["Password"]) { 639 require_once($_SERVER['DOCUMENT_ROOT']."/".$nameradi."/inc/login_admin.php"); 640 exit; 641 } 642 $_SESSION["logged_in"] = true; 643 return $club_row; 644 } 645 646 //mod by lapinidotcom 647 //aggiungo in coda al funlib.inc un include ad un ulteriore file (se non esiste non 648 //viene generato nessun errore) 649 //questo permette personalizzazioni non sovrascritte in futuri aggiornamenti 650 //commentato perche' da comunque warning, forse meglio usare file_exist, Antonio. 651 // include_once 'my_funlib.inc'; 652 //end mod 653 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |