コード例 #1
0
ファイル: my.inc.php プロジェクト: hcd2008/destoon
     $MG['delete'] or message();
     $itemid or message();
     $itemids = is_array($itemid) ? $itemid : array($itemid);
     foreach ($itemids as $itemid) {
         $do->itemid = $itemid;
         $item = $do->get_one();
         if (!$item || $item['username'] != $_username) {
             message();
         }
         $do->recycle($itemid);
     }
     dmsg($L['success_delete'], $forward);
     break;
 case 'refresh':
     $MG['refresh_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback');
     $do->_update($_username);
     $itemid or message($L['select_info']);
     $itemids = $itemid;
     $s = $f = 0;
     foreach ($itemids as $itemid) {
         $do->itemid = $itemid;
         $item = $do->get_one();
         $could_refresh = $item && $item['username'] == $_username;
         if ($could_refresh && $MG['refresh_limit'] && $DT_TIME - $item['edittime'] < $MG['refresh_limit']) {
             $could_refresh = false;
         }
         if ($could_refresh && $MOD['credit_refresh'] && $MOD['credit_refresh'] > $_credit) {
             $could_refresh = false;
         }
         if ($could_refresh) {
             $do->refresh($itemid);