echo "<h4>IF $chglbl $errlbl</h4>"; } }elseif ($pif){ $s = substr($pif,0,1); $act = ($s == 1)?"enabled PoE on":"disabled PoE on"; list($o,$i) = explode('.', substr($pif,1)); if( Set($ip, $wver, $dev[26], "1.3.6.1.2.1.105.1.1.1.3.$o.$i", 'i', ($s)?1:2 ) ){ echo "<h5>SNMP IF $chglbl PoE OK</h5>"; $query = GenQuery('events','i','','','',array('level','time','source','info','class','device'),array(),array('100',time(),$shd,"User $_SESSION[user] $act interface $ifn[$i]",'usrd',$shd) ); if( !DbQuery($query,$link) ){echo "<h4>".DbError($link)."</h4>";}else{echo "<h5>$msglbl $updlbl OK</h5>";} }else{ echo "<h4>IF $chglbl $errlbl</h4>"; } }elseif ($ali and $ifn[$ifx]){ if($ali == "-"){$ali = "";} if( Set($ip, $wver, $dev[26], "1.3.6.1.2.1.31.1.1.1.18.$ifx", 's', $ali) ){ echo "<h5>SNMP IF $ifx Alias = $ali OK</h5>"; $query = GenQuery('interfaces','u',"CONCAT(device,ifname)",'=',"$shd$ifn[$ifx]",array('alias'),array(),array($ali) ); if( !DbQuery($query,$link) ){echo "<h4>".DbError($link)."</h4>";}else{echo "<h5>DB IF $ifn[$ifx] $updlbl OK</h5>";$ifl[$ifx] = $ali;} $query = GenQuery('events','i','','','',array('level','time','source','info','class','device'),array(),array('100',time(),$shd,"User $_SESSION[user] set interface $ifn[$ifx] alias to $ali",'usrd',$shd) ); if( !DbQuery($query,$link) ){echo "<h4>".DbError($link)."</h4>";}else{echo "<h5>$msglbl $updlbl OK</h5>";} }else{ echo "<h4>IF $chglbl $errlbl</h4>"; } } } ?> <table class="full fixed"><tr><td class="helper"> <h2><?= $sumlbl ?></h2><p> <table class="content"><tr>
<?php include "db.php"; include "templates.php"; session_start(); if (isset($_SESSION['user_id'])) { $n = array('', '', '', ''); if (isset($_POST['submit'])) { $n[0] = Set($_POST['FirstName'], 'FIRSTNAME', $conn); $n[1] = Set($_POST['LastName'], 'LASTNAME', $conn); $n[2] = Set($_POST['Bio'], 'BIO', $conn); $n[3] = Set($_POST['Password'], 'PASSWORD', $conn); } echo $logo; echo 'Welcome, ' . pick_users_data($_SESSION['user_id'], 'FIRSTNAME', $conn) . '!'; echo $profile_menu; echo $settings; if (isset($_GET['Back'])) { header('Location: /profile.php'); } } else { echo ' <html> <body> <h1>SOCIAL NETWORK</h1> <a href="index.php">Sign In</a> </body> </html>'; }