%PDF- %PDF-
Direktori : /www/old2/_music/ingress/ |
Current File : /www/old2/_music/ingress/insert.php |
<?php include "lib.php"; if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="waritko ingress"'); header('HTTP/1.0 401 Unauthorized'); echo 'Musite se prihlasit aby jste mohli prohlizet historii'; exit; } else { $user = $_SERVER['PHP_AUTH_USER']; $spojeni = pg_connect("host=localhost port=5432 dbname=ingress user=postgres"); $res = q("select password, id from users where username='".$user."'"); if(!$res || trim($res[0][0]) != trim($_SERVER['PHP_AUTH_PW'])) { header('WWW-Authenticate: Basic realm="waritko ingress"'); header('HTTP/1.0 401 Unauthorized'); echo 'Musite se prihlasit aby jste mohli prohlizet historii'; exit; } $uid = $res[0][1]; } if($_GET['action'] == "insert") { $query = "insert into records(\"user\", action_time, description, resonator1, resonator2, resonator3, resonator4, resonator5, resonator6, resonator7, resonator8, buster1, buster2, buster3, buster4, buster5, buster6, buster7, buster8, shieldc, shieldr, shieldvr, experience) VALUES($uid, now(), '".$_POST['description']."', ".$_POST['resonator1'].", ".$_POST['resonator2'].", ".$_POST['resonator3'].", ".$_POST['resonator4'].", ".$_POST['resonator5'].", ".$_POST['resonator6'].", ".$_POST['resonator7'].", ".$_POST['resonator8'].", ".$_POST['buster1'].", ".$_POST['buster2'].", ".$_POST['buster3'].", ".$_POST['buster4'].", ".$_POST['buster5'].", ".$_POST['buster6'].", ".$_POST['buster7'].", ".$_POST['buster8'].", ".$_POST['shieldc'].", ".$_POST['shieldr'].", ".$_POST['shieldvr'].", ".$_POST['experience'].")"; q($query); header("Location: index.php"); } ?> <html> <head> <TITLE>Ingress equip</TITLE> <META HTTP-EQUIV="Cache-Control" content="no-cache"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <style> body { font-family: Verdana,Tahoma,Arial,Helvetica; font-size:9pt} .header { font-size: 16pt; font-weight: 900; } </style> </head> <body> <form action="insert.php?action=insert" method="post"> <table width="1000" border="1"> <tr> <th>Resonator L1</th> <th>Resonator L2</th> <th>Resonator L3</th> <th>Resonator L4</th> <th>Resonator L5</th> <th>Resonator L6</th> <th>Resonator L7</th> <th>Resonator L8</th> <th>XMP Buster L1</th> <th>XMP Buster L2</th> <th>XMP Buster L3</th> <th>XMP Buster L4</th> <th>XMP Buster L5</th> <th>XMP Buster L6</th> <th>XMP Buster L7</th> <th>XMP Buster L8</th> <th>Common shield</th> <th>Rare shield</th> <th>V Rare shield</th> <th>Experience</th> </tr> <tr> <td><input type="text" name="resonator1" size="4" /></td> <td><input type="text" name="resonator2" size="4" /></td> <td><input type="text" name="resonator3" size="4" /></td> <td><input type="text" name="resonator4" size="4" /></td> <td><input type="text" name="resonator5" size="4" /></td> <td><input type="text" name="resonator6" size="4" /></td> <td><input type="text" name="resonator7" size="4" /></td> <td><input type="text" name="resonator8" size="4" /></td> <td><input type="text" name="buster1" size="4" /></td> <td><input type="text" name="buster2" size="4" /></td> <td><input type="text" name="buster3" size="4" /></td> <td><input type="text" name="buster4" size="4" /></td> <td><input type="text" name="buster5" size="4" /></td> <td><input type="text" name="buster6" size="4" /></td> <td><input type="text" name="buster7" size="4" /></td> <td><input type="text" name="buster8" size="4" /></td> <td><input type="text" name="shieldc" size="4" /></td> <td><input type="text" name="shieldr" size="4" /></td> <td><input type="text" name="shieldvr" size="4" /></td> <td><input type="text" name="experience" size="10" /></td> </tr> </table> <input type="text" size="60" name="description" /></br> <input type="submit" name="submit" value="Submit" /> </form> </body> </html>