Пример #1
0
 static function deleteItem($userid, $listid, $skey)
 {
     global $adodb;
     $list = new UserList();
     $check = $list->getUserSession($userid);
     if ($skey == $check['skey']) {
         $query = "DELETE from UserList where userid = %s and listid = %s";
         try {
             $res = $adodb->Execute(sprintf($query, $adodb->qstr($userid), $adodb->qstr($listid)));
             return $listid;
         } catch (Exception $e) {
             http_response_code(400);
         }
     } else {
         http_response_code(403);
     }
 }