예제 #1
0
파일: view.php 프로젝트: iabing/mzzyc
     $arc->Close();
     exit;
 } else {
     if ($dopost == 'buy') {
         $inquery = "INSERT INTO `#@__member_operation`(mid,oldinfo,money,mtime,buyid,product,pname)\r\n                              VALUES ('" . $cfg_ml->M_ID . "','{$arctitle}','{$needMoney}','" . time() . "', 'ARCHIVE" . $aid . "', 'archive',''); ";
         if ($dsql->ExecuteNoneQuery($inquery)) {
             $inquery = "UPDATE `#@__member` SET money=money-{$needMoney} WHERE mid='" . $cfg_ml->M_ID . "'";
             if (!$dsql->ExecuteNoneQuery($inquery)) {
                 showmsg('购买失败, 请返回', -1);
                 exit;
             }
             #api{{
             if (defined('UC_APPID')) {
                 include_once DEDEROOT . '/api/uc.func.php';
                 $row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='" . $cfg_ml->M_ID . "'");
                 uc_credit_note($row['userid'], -$needMoney, 'money');
             }
             #/aip}}
             showmsg('购买成功,购买扣点不会重扣金币,谢谢!', '/plus/view.php?aid=' . $aid);
             exit;
         } else {
             showmsg('购买失败, 请返回', -1);
             exit;
         }
     }
     $msgtitle = "扣金币购买阅读!";
     $moremsg = "阅读该文档内容需要付费!<br>这篇文档需要 <font color='red'>" . $needMoney . " 金币</font> 才能访问,你目前拥有金币 <font color='red'>" . $cfg_ml->M_Money . " </font>个!<br>确认阅读请点 [<a href='/plus/view.php?aid=" . $aid . "&dopost=buy' target='_blank'>确认付点阅读</a>]";
     include_once $cfg_basedir . $cfg_templets_dir . "/plus/view_msg.htm";
     $arc->Close();
     exit;
 }
예제 #2
0
     if ($artUrl == '') {
         $artUrl = $cfg_phpurl . "/view.php?aid={$arcID}";
     }
     #api{{
     if (defined('UC_API') && @(include_once DEDEROOT . '/api/uc.func.php')) {
         //推送事件
         $feed['icon'] = 'thread';
         $feed['title_template'] = '<b>{username} 在网站发布了一篇文章</b>';
         $feed['title_data'] = array('username' => $cfg_ml->M_UserName);
         $feed['body_template'] = '<b>{subject}</b><br>{message}';
         $url = !strstr($artUrl, 'http://') ? $cfg_basehost . $artUrl : $artUrl;
         $feed['body_data'] = array('subject' => "<a href=\"" . $url . "\">{$title}</a>", 'message' => cn_substr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $description)), 150));
         $feed['images'][] = array('url' => $cfg_basehost . '/images/scores.gif', 'link' => $cfg_basehost);
         uc_feed_note($cfg_ml->M_LoginID, $feed);
         $row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='" . $cfg_ml->M_ID . "' AND `matt`<>10");
         uc_credit_note($row['userid'], $cfg_sendarc_scores);
     }
     #/aip}}
     //会员动态记录
     $cfg_ml->RecordFeeds('add', $title, $description, $arcID);
     ClearMyAddon($arcID, $title);
     //返回成功信息
     $msg = "请选择你的后续操作:\n    <a href='article_add.php?cid={$typeid}'><u>继续发布文章</u></a>\n    &nbsp;&nbsp;\n    <a href='{$artUrl}' target='_blank'><u>查看文章</u></a>\n    &nbsp;&nbsp;\n    <a href='article_edit.php?channelid={$channelid}&aid={$arcID}'><u>更改文章</u></a>\n    &nbsp;&nbsp;\n    <a href='content_list.php?channelid={$channelid}'><u>已发布文章管理</u></a>";
     $wintitle = "成功发布文章!";
     $wecome_info = "文章管理::发布文章";
     $win = new OxWindow();
     $win->AddTitle("成功发布文章:");
     $win->AddMsgItem($msg);
     $winform = $win->GetWindow("hand", "&nbsp;", false);
     $win->Display();
 }
예제 #3
0
        InsertTags($tags, $arcID);
        $artUrl = MakeArt($arcID, true);
        if ($artUrl == '') {
            $artUrl = $cfg_phpurl . "/view.php?aid={$arcID}";
        }
        #api{{
        if (defined('UC_API') && @(include_once DEDEROOT . '/api/uc.func.php')) {
            //推送事件
            $feed['icon'] = 'thread';
            $feed['title_template'] = '<b>{username} 在网站共享了一软件</b>';
            $feed['title_data'] = array('username' => $cfg_ml->M_UserName);
            $feed['body_template'] = '<b>{subject}</b><br>{message}';
            $url = !strstr($artUrl, 'http://') ? $cfg_basehost . $artUrl : $artUrl;
            $feed['body_data'] = array('subject' => "<a href=\"" . $url . "\">{$title}</a>", 'message' => cn_substr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $description)), 150));
            $feed['images'][] = array('url' => $cfg_basehost . '/images/scores.gif', 'link' => $cfg_basehost);
            uc_feed_note($cfg_ml->M_LoginID, $feed);
            //同步积分
            uc_credit_note($cfg_ml->M_LoginID, $cfg_sendarc_scores);
        }
        #/aip}}
        //返回成功信息
        $msg = "\r\n\t\t请选择你的后续操作:\r\n\t\t<a href='soft_add.php?cid={$typeid}'><u>继续发布软件</u></a>\r\n\t\t&nbsp;&nbsp;\r\n\t\t<a href='{$artUrl}' target='_blank'><u>查看软件</u></a>\r\n\t\t&nbsp;&nbsp;\r\n\t\t<a href='soft_edit.php?channelid={$channelid}&aid={$arcID}'><u>更改软件</u></a>\r\n\t\t&nbsp;&nbsp;\r\n\t\t<a href='content_list.php?channelid={$channelid}'><u>已发布软件管理</u></a>\r\n\t\t";
        $wintitle = "成功发布文章!";
        $wecome_info = "文章管理::发布文章";
        $win = new OxWindow();
        $win->AddTitle("成功发布文章:");
        $win->AddMsgItem($msg);
        $winform = $win->GetWindow("hand", "&nbsp;", false);
        $win->Display();
    }
}
예제 #4
0
     $uptime = GetMkTime($uptime);
     if ($matt == 10 && $oldmatt != 10) {
         ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作!", "-1");
         exit;
     }
     $query = "UPDATE `#@__member` SET\n            email = '{$email}',\n            uname = '{$uname}',\n            sex = '{$sex}',\n            matt = '{$matt}',\n            money = '{$money}',\n            scores = '{$scores}',\n            rank = '{$rank}',\n            spacesta='{$spacesta}',\n            uptime='{$uptime}',\n            exptime='{$exptime}'\n            {$pwdsql}\n            WHERE mid='{$id}' AND matt<>10 ";
     $rs = $dsql->ExecuteNoneQuery2($query);
     if ($rs == 0) {
         $query = "UPDATE `#@__member` SET\n            email = '{$email}',\n            uname = '{$uname}',\n            sex = '{$sex}',\n            money = '{$money}',\n            scores = '{$scores}',\n            rank = '{$rank}',\n            spacesta='{$spacesta}',\n            uptime='{$uptime}',\n            exptime='{$exptime}'\n            {$pwdsql}\n            WHERE mid='{$id}' ";
         $rs = $dsql->ExecuteNoneQuery2($query);
     }
     #api{{
     if (defined('UC_API') && @(include_once DEDEROOT . '/api/uc.func.php')) {
         $row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='{$id}' AND `matt`<>10");
         $amount = $scores - $row['scores'];
         uc_credit_note($row['userid'], $amount);
     }
     #/aip}}
     ShowMsg('成功更改会员资料!', 'member_view.php?id=' . $id);
     exit;
 } else {
     if ($dopost == "memberlogin") {
         CheckPurview('member_Edit');
         PutCookie('DedeUserID', $id, 1800);
         PutCookie('DedeLoginTime', time(), 1800);
         if (empty($jumpurl)) {
             header("location:../member/index.php");
         } else {
             header("location:{$jumpurl}");
         }
     } else {