public function update($routerid, $setarr) { if ($setarr['router']) { $setarr['router'] = serialize($setarr['router']); } return parent::update($routerid, $setarr); }
public function insert_by_exts($appid, $exts) { if (!$appid) { return false; } if (!is_array($exts)) { $exts = $exts ? explode(',', $exts) : array(); } //删除原来的ext $oexts = array(); $delids = array(); $oextarr = DB::fetch_all("select * from " . DB::table('app_open') . " where appid='{$appid}'"); foreach ($oextarr as $value) { $oexts[] = $value['ext']; if (!in_array($value['ext'], $exts)) { $delids[] = $value['extid']; } } if ($delids) { self::delete($delids); } foreach ($exts as $ext) { if ($ext && !in_array($ext, $oexts)) { parent::insert(array('ext' => $ext, 'appid' => $appid)); } } $this->clear_cache('ext_all'); $this->clear_cache('all'); return true; }
function fetch_by_jobid($jobid) { include_once libfile('function/organization'); $data = parent::fetch($jobid); $data['orgtree'] = getTreeByOrgid($data['orgid']); return $data; }
public function setUnrun_by_aid($aid, $r) { //设置允许运行,如果文件在本地同时修改实际文件名,增加无法运行的后缀; $data = parent::fetch($aid); if ($data['remote'] == 0 || $data['remote'] == 1) { //文件在本地,修改文件名 if ($r > 0) { $earr = explode('.', $data['attachment']); foreach ($earr as $key => $ext) { if (in_array(strtolower($ext), array($data['filetype'], 'dzz'))) { unset($earr[$key]); } } $tattachment = implode('.', $earr) . '.dzz'; if ($is_file(getglobal('setting/attachdir') . './' . $data['attachment']) && @rename(getglobal('setting/attachdir') . './' . $data['attachment'], getglobal('setting/attachdir') . './' . $tattachment)) { return parent::update($aid, array('unrun' => $r, 'attachment' => $tattachment)); } } else { $earr = explode('.', $data['attachment']); foreach ($earr as $key => $ext) { if (in_array(strtolower($ext), array($data['filetype'], 'dzz'))) { unset($earr[$key]); } } $tattachment = implode('.', $earr) . '.' . $data['filetype']; if ($is_file(getglobal('setting/attachdir') . './' . $data['attachment']) && @rename(getglobal('setting/attachdir') . './' . $data['attachment'], getglobal('setting/attachdir') . './' . $tattachment)) { return parent::update($aid, array('unrun' => $r, 'attachment' => $tattachment)); } } } return false; }
public function __construct() { $this->_table = 'user_status'; $this->_pk = 'uid'; $this->_pre_cache_key = 'user_status_'; parent::__construct(); }
public function insert_by_tid_uid($tid, $uid) { if (!$tid || !$uid) { return false; } return parent::insert(array('tid' => $tid, 'uid' => $uid), 0, 1); }
public function __construct() { $this->_table = 'app_relative'; $this->_pk = 'rid'; //$this->_pre_cache_key = 'app_relative_'; //$this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'source_link'; $this->_pk = 'lid'; $this->_pre_cache_key = 'source_link_'; $this->_cache_ttl = 0; parent::__construct(); }
public function insert_by_uid($uid, $jobid) { if (!$jobid) { return self::delete_by_uid($uid); } $setarr = array('uid' => $uid, 'jobid' => $jobid, 'dateline' => TIMESTAMP, 'opuid' => getglobal('uid')); return parent::insert($setarr, 1, 1); }
public function __construct() { $this->_table = 'source_attach'; $this->_pk = 'qid'; $this->_pre_cache_key = 'source_attach_'; $this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'count'; $this->_pk = 'jid'; //$this->_pre_cache_key = 'count_'; //$this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'iconview'; $this->_pk = 'id'; /*$this->_pre_cache_key = 'iconview_'; $this->_cache_ttl = 0;*/ parent::__construct(); }
public function __construct() { $this->_table = 'app_pic'; $this->_pk = 'picid'; /*$this->_pre_cache_key = 'app_pic_'; $this->_cache_ttl = 0;*/ parent::__construct(); }
public function __construct() { $this->_table = 'local_storage'; $this->_pk = 'remoteid'; /*$this->_pre_cache_key = 'local_storage_'; $this->_cache_ttl = 300;*/ parent::__construct(); }
public function __construct() { $this->_table = 'app_market'; $this->_pk = 'appid'; $this->_pre_cache_key = 'app_market_'; $this->_cache_ttl = 0; parent::__construct(); }
public function copy_by_cid($ocid, $cid) { foreach (DB::fetch_all("select * from %t where cid=%d", array($this->_table, $ocid)) as $value) { $value['cid'] = $cid; parent::insert($value, 0, 1); } return 0; }
public function __construct() { $this->_table = 'source_music'; $this->_pk = 'mid'; $this->_pre_cache_key = 'source_music_'; $this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'cai_video'; $this->_pk = 'cid'; //$this->_pre_cache_key = 'cai_video_'; //$this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'source_document'; $this->_pk = 'did'; $this->_pre_cache_key = 'source_document_'; $this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'app_open_default'; $this->_pk = ''; //$this->_pre_cache_key = 'app_open_'; //$this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'feed_post'; $this->_pk = 'pid'; $this->_pre_cache_key = 'feed_post_'; $this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'user_verify'; $this->_pk = 'uid'; $this->_pre_cache_key = 'user_verify_'; //$this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'source_image'; $this->_pk = 'picid'; $this->_pre_cache_key = 'source_image_'; $this->_cache_ttl = 0; parent::__construct(); }
public function __construct() { $this->_table = 'folder'; $this->_pk = 'fid'; $this->_pre_cache_key = 'folder_'; $this->_cache_ttl = 0; parent::__construct(); }
public function delete_by_id($id) { $data = self::fetch($id); if ($return = parent::delete($id)) { self::update_groupid_by_uid($data['uid']); } return $return; }
public function __construct() { $this->_table = 'icon'; $this->_pk = 'did'; $this->_pre_cache_key = 'icon_'; $this->_cache_ttl = 60 * 60; parent::__construct(); }
public function __construct() { $this->_table = 'connect'; $this->_pk = 'bz'; $this->_pre_cache_key = 'connect_'; $this->_cache_ttl = 60 * 60; parent::__construct(); }
public function delete_by_voteid($voteids) { $ret = 0; $voteids = (array) $voteids; if ($ret = parent::delete($voteids)) { C::t('vote_item')->delete_by_voteid($voteids); } return $ret; }
public function insert_by_itemid($itemids, $uid) { $itemids = (array) $itemids; $ret = 0; foreach ($itemids as $itemid) { $ret += parent::insert(array('uid' => $uid, 'itemid' => $itemid, 'dateline' => TIMESTAMP), 0, 1); } return $ret; }
public function insert_by_pid($pid, $tid, $uids) { if (!$pid || !$uids) { return false; } foreach ($uids as $uid) { parent::insert(array('pid' => $pid, 'tid' => $tid, 'uid' => $uid, 'dateline' => TIMESTAMP), 0, 1); } }