Пример #1
0
             set_cookie('dmsg', $msg);
             $forward = $MODULE[2]['linkurl'] . $DT['file_my'] . '?mid=' . $mid . '&status=' . $post['status'];
             $msg = '';
         } else {
             $forward = $MODULE[2]['linkurl'] . $DT['file_my'] . '?mid=' . $mid . '&action=add';
         }
         $js .= 'window.onload=function(){parent.window.location="' . $forward . '";}';
         dalert($msg, '', $js);
     } else {
         dalert($do->errmsg, '', ($need_captcha ? reload_captcha() : '') . ($need_question ? reload_question() : ''));
     }
 } else {
     if ($itemid) {
         $MG['copy'] or dalert(lang('message->without_permission_and_upgrade'), 'goback');
         $do->itemid = $itemid;
         $r = $do->get_one();
         if (!$r || $r['username'] != $_username) {
             message();
         }
         extract($r);
         $thumb = '';
         $totime = $totime ? timetodate($totime, 3) : '';
     } else {
         foreach ($do->fields as $v) {
             ${$v} = '';
         }
         $content = '';
         $catid = 0;
         $sex = 1;
         if ($_userid) {
             $user = userinfo($_username);