????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.222.82.248 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/digitaliseringstrappan.astacus.se/ |
Upload File : |
<?php session_start(); if($_SESSION['DIGTRAPP_LOGIN'][0] == ""){ header("location: index.php"); } $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("fi2xml_tool"); $sql = "SELECT * FROM tblLicenses WHERE id = '".$_SESSION['DIGTRAPP_LOGIN'][0]."'"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $SystemUserId = $row['id']; $Admin = $row['Admin']; $CompanyId = $row['CompanyId']; $Username = $row['Username']; $Company = $row['Company']; $GUID = $row['GUID']; } ?> <!DOCTYPE html> <html lang="sv"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Konto - Webbportal</title> <link rel="stylesheet" href="styles.css"> </head> <script> function add_license(active, total){ if(active < total ){ location.href = "add_license.php?username="+document.getElementById("epost").value+"&Company=<?php echo($Company);?>"; }else{ alert("Du behöver beställa fler licenser!"); location.href = "order_license.php?username="+document.getElementById("epost").value; } } function updateActive(selectObject){ var value = selectObject.value; const myArray = value.split("#"); var go = true; var countLicence = document.getElementById("CountLicense").value; if(countLicence >= 1 && myArray[1] == 1){ alert("Du måste inaktivera en licens för att tilldela en ny!"); selectObject.selectedIndex = "1"; go = false; } if(go == true){ location.href = "updateActive.php?SystemUserId="+myArray[0]+"&value="+myArray[1]; } } </script> <body> <!-- Sidebar Menu --> <aside id="sidebar"><br> ASTACUS TOOLBOX<br> <hr> <nav> <ul> <li><a href="konto.php"><img src="images/konto.png" width="15" height="15" alt="" class="center"/> Konto / Licens</a></li> <?php if($Admin == "1"){?> <li><a href="admin.php"><img src="images/admin.png" width="15" height="15" alt="" class="center"/> Administration</a></li> <?php }?> <li><a href="download.php"><img src="images/download.png" width="15" height="15" alt="" class="center"/> Nedladdning</a></li> <li><a href="support.php"><img src="images/support.png" width="15" height="15" alt="" class="center"/> Support</a></li> </ul> <br> <hr> <ul> <li><a href="index.php?logout=true">Logga ut</a></li> </ul> </nav> <nav> </nav> <nav> </nav> </aside> <!-- User Account Section --> <main> <section id="account-section"> <h2>Administration<br> </h2> Här nedan visas alla licenser som tillhör din organisation. <br> <br> <table width="1000" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <th width="245" align="left" scope="col">Användarnamn</th> <th width="337" align="left" scope="col">Licensnyckel</th> <th width="87" align="left" scope="col">Aktiv</th> <th width="111" align="left" scope="col">Betald</th> <th width="104" align="left" scope="col">Giltig till</th> <th width="116" align="left" scope="col">Roll</th> </tr> </tbody> </table> <?php $sql = "SELECT * FROM tblLicenses WHERE CompanyId = '".$_SESSION['DIGTRAPP_LOGIN'][2]."'"; $Login = false; $result = mysql_query($sql); $X = 0; $Paid_Count=0; $Active_Count = 0; while ($row = mysql_fetch_assoc($result)){ $SystemUserId = $row['id']; $GUID = $row['GUID']; $CompanyId = $row['CompanyId']; $Username = $row['Username']; $Expirydate = $row['Expirydate']; if($row['Admin'] == "1"){ $Roll = "Admin"; }else{ $Roll = "Användare"; } if($row['Active'] == "1"){ $Aktiv = "Aktiv"; $Active_Count++; }else{ $Aktiv = "Ej aktiv"; } $Paid = $row['Payed']; if($Paid == "1"){ $Paid_Count++; $Paid = "Ja"; }else{ $Paid = "Nej"; } $X++; ?> <table width="1000" height="25" border="0" cellspacing="0" cellpadding="0" style="font-size: 12px"> <tbody> <tr> <th width="245" align="left" scope="col"><?php echo($Username);?></th> <th width="337" align="left" scope="col"><?php echo($GUID);?></th> <th width="86" align="left" scope="col"> <select name="Active" id="Active" onChange="updateActive(this);"> <option value="<?php echo($SystemUserId);?>#1" <?php if($Aktiv == "Aktiv"){echo("selected");}?>>Aktiv</option> <option value="<?php echo($SystemUserId);?>#0" <?php if($Aktiv == "Ej aktiv"){echo("selected");}?>>Ej aktiv</option> </select> </th> <th width="110" align="left" scope="col"><?php echo($Paid);?></th> <th width="105" align="left" scope="col"><?php echo($Expirydate);?></th> <th width="117" align="left" scope="col"><?php echo($Roll);?></th> </tr> </tbody> </table> <?php }?> <br> <br> Du har nyttjat <?php echo($Active_Count)?> av <?php echo($Paid_Count);?> licenser.<br> <br> <input type="hidden" id="CountLicense" value="<?php echo($Active_Count/$Paid_Count)?>"> <strong>Du kan bjuda in fler användare via formuläret nedan:</strong> <br> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <th width="178" align="left" scope="col">Användarens e-post:</th> <th width="354" scope="col"><input name="epost" type="text" id="epost" size="45" value=""/></th> <th width="268" scope="col"> <button id="order-license2" onclick="add_license(<?php echo($Active_Count);?>,<?php echo($Paid_Count);?>);">Tildela Licens</button></th> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> </tr> </tbody> </table> <br> <br> </section> </main> </body> </html>