Пример #1
0
 public static function register($argv)
 {
     global $_db, $_cache;
     unset($argv['user_id']);
     $argv = right_merge($argv, self::$default_value);
     $_db->insert('users', $argv);
     return $_db->insert_id;
 }
Пример #2
0
 public static function add($argv)
 {
     global $_db, $_user;
     unset($argv['msg_id']);
     $argv['user_id'] = $_user->user_id;
     $argv['addtime'] = time();
     $argv = right_merge($argv, self::$default_value);
     $_db->insert('msgs', $argv);
     return $_db->insert_id;
 }
Пример #3
0
 public static function add($argv)
 {
     global $_db, $_user;
     unset($argv['schema_id']);
     $argv['user_id'] = $_user->user_id;
     $argv = right_merge($argv, self::$default_value);
     if (isset($argv['channel']) && isset($argv['url']) && !$argv['channel'] && !filter_var($argv['url'], FILTER_VALIDATE_URL)) {
         return false;
     }
     if ($argv['keywords']) {
         $argv['keywords'] = keywords_segment($argv['keywords']);
     }
     $_db->insert('schemas', $argv);
     return $_db->insert_id;
 }