Exemplo n.º 1
0
function showSettingsform()
{
    $realname = getRealName();
    $sitename = getSiteName();
    $tagline = getTagline();
    $rawsiteurl = getRawSiteUrl();
    $indexNum = getIndexNum();
    $rssNum = getRssNum();
    $rewriteCheck = getrewriteCheck();
    if ($rewriteCheck == 1) {
        $checked = "checked";
    } else {
        $checked = "";
    }
    echo "<p><b>general site settings:</b></p>";
    echo "<form action=\"";
    echo $_SERVER['PHP_SELF'];
    echo "\"";
    echo " method=\"post\">";
    echo "user: <input type=\"text\" name=\"user\"><br />";
    echo "pass: <input type=\"password\" name=\"pass\"><br />";
    echo "real name: <input type=\"text\" name=\"realname\" value=\"" . $realname . "\"><br />";
    echo "name of site: <input type=\"text\" name=\"site\" value=\"" . $sitename . "\"><br />";
    echo "tagline for site: <input type=\"text\" name=\"tagline\" value=\"" . $tagline . "\"><br />";
    echo "base url (without http://): <input type=\"text\" name=\"url\" value=\"" . $rawsiteurl . "\"><br />";
    echo "number of entries to display per page: <input type=\"text\" name=\"index\" value=\"" . $indexNum . "\"><br />";
    echo "number of entries to display in rss feed: <input type=\"text\" name=\"rss\" value=\"" . $rssNum . "\"><br />";
    echo "use mod_rewrite? (remove .htaccess if you uncheck this): <input type=\"checkbox\" name=\"rewrite\" value=\"1\" " . $checked . "><br />";
    echo "<input type=\"hidden\" name=\"checksubmit\" value=\"1\">";
    echo "<input type=\"submit\" name=\"submit\" value=\"update\">";
    echo "</form>";
}
Exemplo n.º 2
0
<?php

header('Content-type: application/atom+xml');
include_once "db.php";
include_once "dertyn.php";
$numRss = getRssNum();
$realname = getRealName();
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
?>

<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:thr="http://purl.org/syndication/thread/1.0"
      xml:lang="en-us"  
      xml:base="<?php 
echo $siteurl;
?>
/atom.php">
	<title type="text"><?php 
echo $sitename;
?>
</title>
	<subtitle type="text"><?php 
echo $tagline;
?>
</subtitle>
	<updated><?php 
getLastUpdatedAtom();
?>
</updated>
	<generator uri="http://dertyn.com/" version="<?php 
echo $version;
Exemplo n.º 3
0
 public function _initiativetenderreturnAct()
 {
     file_put_contents('/tmp/4.txt', date('m-d H:i:s') . " returnplant异步:" . print_r($_POST, true) . "\n", FILE_APPEND);
     $is_avail = $this->is_avail($_POST);
     if ($is_avail) {
         $usrid = $_POST['UsrCustId'];
         $db = core::Singleton('comm.db.activeRecord');
         $db->connect('CAILAI');
         $info = $db->get_one($where = array('usrid' => $usrid), '', 'lzh_huifulog');
         //                file_get_contents('/tmp/3',json_encode($_POST));
         //$info = M("huifulog")->distinct(true)->field("uid,username")->where('usrid' => $usrid)->find();
         $data = array();
         $data['uid'] = $info['uid'];
         //用户UID
         $data['username'] = $info['username'];
         //用户名
         $data['rescode'] = $_POST['RespCode'];
         //返回码
         $data['cmdid'] = $_POST['CmdId'];
         //消息类型
         $data['usrid'] = $_POST['UsrCustId'];
         //用户客户号
         $data['ordid'] = $_POST['OrdId'];
         //订单号
         $data['orddate'] = $_POST['OrdDate'];
         //订单日期
         $data['trxid'] = $_POST['TrxId'];
         //交易流水号
         $data['merpriv'] = $_POST['MerPriv'];
         $data['addtime'] = time();
         //记录时间
         //防止钱投完使用红包不扣款的bug出现
         $reqext = $_POST['RespExt'];
         //代金券的内容json字符串
         $reqext = urldecode($reqext);
         $reqext = json_decode($reqext, 1);
         $reqext = $reqext['Vocher']['VocherAmt'];
         file_put_contents('/tmp/4.txt', date('m-d H:i:s') . " returnplant异步红包:" . print_r($reqext, true) . "\n", FILE_APPEND);
         sleep(1);
         //防止与前台回调同步到达
         $condition['uid'] = $data['uid'];
         $condition['ordid'] = $data['ordid'];
         $num = $db->count_all($condition, 'lzh_huifulog');
         if ($num === 0) {
             //                        $db = core::Singleton('comm.db.activeRecord');
             //                        $db->connect('CAILAI');
             $db->insert($data, 'lzh_huifulog');
             if (strcmp($_POST['RespCode'], "000") == 0) {
                 $temp = base64_decode($data['merpriv']);
                 $pos1 = strpos($temp, '{');
                 $pos2 = strpos($temp, '}');
                 $len = $pos2 - $pos1 + 1;
                 $merpriv = substr($temp, $pos1, $len);
                 $merpriv = json_decode($merpriv, true);
                 //				file_put_contents('/tmp/4.txt',date('m-d H:i:s')." return  ".print_r($merpriv,true)."\n",FILE_APPEND);
                 $borrow_id = $merpriv['borrowid'];
                 //标ID
                 $money = str2val_money($_POST['TransAmt']);
                 //交易金额
                 $info = array();
                 $info['ordid'] = $data['ordid'];
                 //订单号
                 $info['orddate'] = $data['orddate'];
                 //订单日期
                 $info['freezeordid'] = $_POST['FreezeOrdId'];
                 //冻结订单号
                 $info['freezetrxid'] = $_POST['FreezeTrxId'];
                 //冻结流水号
                 //                                $db = core::Singleton('comm.db.activeRecord');
                 $db->connect('CAILAI');
                 $invest_info_id = $db->insert($info, 'lzh_borrow_investor');
                 //				$invest_info_id = M('borrow_investor')->add($info);
                 //剪去红包的钱 才是真正扣掉的钱
                 //$money=$money-$reqext;
                 file_put_contents('/tmp/4.txt', date('m-d H:i:s') . " returnplant真钱:" . print_r($money, true) . "\n", FILE_APPEND);
                 $l = investMoney($data['uid'], $borrow_id, $money, 0, $invest_info_id, $reqext);
                 $borrowName = getBorrowName($borrow_id);
                 $realName = getRealName($data['uid']);
                 $content = "尊敬的财来网投资人" . $realName['real_name'] . ",您于" . date("Y") . "年" . date("m") . "月" . date("d") . "日" . date("H") . ":" . date("i") . "分向" . $borrowName['borrow_name'] . "标的投资" . $money . "元,资金已冻结,将于满标复审后计息,详情请咨询客户经理,或致电400-079-8558";
                 sendsms(trim($data['username']), $content);
             }
         }
         echo "RECV_ORD_ID_" . $_POST['OrdId'];
     }
     exit;
 }