Ejemplo n.º 1
0
     break;
 case 15:
     //add widget comment
     if (!isset($_GET['id']) || !isset($_GET['uname']) || !isset($_GET['pw']) || !isset($_POST['c'])) {
         die("Missing parameter!");
         break;
     }
     $nameId = $_GET['id'];
     $username = $_GET['uname'];
     $pw = $_GET['pw'];
     $comment = $_POST['c'];
     $userId = checkUsername($username, $pw);
     if ($userId < 0) {
         die("Rejected!");
     }
     $dbresult = $dbConnect->addComment($nameId, $userId, $comment);
     die("Commented!");
     break;
 case 16:
     //get comments
     $nameId = $_GET['id'];
     $dbresult = $dbConnect->getCommentsByNameId($nameId);
     $xmlDoc->createComments();
     $xmlDoc->addMysqlResult($dbresult, 'Comment');
     break;
 case 17:
     //get files for multiple lua ids, they come comma separated
     if (!isset($_POST['ids'])) {
         $luaIds = $_GET['ids'];
     } else {
         $luaIds = $_POST['ids'];