コード例 #1
0
ファイル: Mregister.php プロジェクト: prasinar/mathml
 public static function register($user, $pass, $email)
 {
     $query = "insert into account(username,password,email) values('{$user}','{$pass}','{$email}')";
     Mdb::nonSelectQuery($query);
     $query = "insert into profile(status) values('active')";
     Mdb::nonSelectQuery($query);
 }
コード例 #2
0
ファイル: Mmy.php プロジェクト: prasinar/mathml
 public static function delete($id)
 {
     $query = "delete from expression where id={$id}";
     Mdb::nonSelectQuery($query);
 }
コード例 #3
0
ファイル: Mlogin.php プロジェクト: prasinar/mathml
 public static function setPassword($user, $pass)
 {
     $query = "update account set password='******' where username='******'";
     Mdb::nonSelectQuery($query);
 }
コード例 #4
0
ファイル: Mnew.php プロジェクト: prasinar/mathml
 public static function updateExpression($id, $name, $desc, $content)
 {
     $query = "update expression set name='{$name}',description='{$desc}',content='{$content}' where id={$id}";
     Mdb::nonSelectQuery($query);
 }
コード例 #5
0
ファイル: Mexpression.php プロジェクト: prasinar/mathml
 public static function save($accid, $fid, $type)
 {
     if ($type == "DODAJ U KOLEKCIJU") {
         $query = "insert into pinned(accid,fid) values({$accid},{$fid})";
         Mdb::nonSelectQuery($query);
         $query = "update expression set popularity=popularity+1 where id={$fid}";
         Mdb::nonSelectQuery($query);
     } else {
         if ($type == "BRIŠI IZ KOLEKCIJE") {
             $query = "delete from pinned where accid={$accid} and fid={$fid}";
             Mdb::nonSelectQuery($query);
             $query = "update expression set popularity=popularity-1 where id={$fid}";
             Mdb::nonSelectQuery($query);
         }
     }
 }