Exemple #1
0
 public function borrowpaying()
 {
     $membertype = member_type($this->uid);
     if ($membertype['status'] == 1) {
         $map['danbao'] = $this->uid;
     } else {
         $map['borrow_uid'] = $this->uid;
     }
     $map['borrow_status'] = 6;
     if ($_GET['start_time'] && $_GET['end_time']) {
         $_GET['start_time'] = strtotime($_GET['start_time'] . " 00:00:00");
         $_GET['end_time'] = strtotime($_GET['end_time'] . " 23:59:59");
         if ($_GET['start_time'] < $_GET['end_time']) {
             $map['add_time'] = array("between", "{$_GET['start_time']},{$_GET['end_time']}");
             $search['start_time'] = $_GET['start_time'];
             $search['end_time'] = $_GET['end_time'];
         }
     }
     $map['status'] = 7;
     $list = getBorrowList($map, 10);
     $this->assign('search', $search);
     $this->assign("list", $list['list']);
     $this->assign("pagebar", $list['page']);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
Exemple #2
0
 public function index()
 {
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         $this->error("您是" . $type['type'] . "用户不能发布借款");
         die;
     }
     $this->display();
 }
Exemple #3
0
 public function autotenderplan()
 {
     $transamt = $_POST['tendamount'];
     $user = M("members")->field("usrid")->where("id=" . $this->uid)->find();
     $usrid = $user['usrid'];
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         $this->error("您是" . $type['type'] . "用户不能投标");
     }
     import("ORG.Huifu.Huifu");
     $huifu = new Huifu();
     $huifu->autoTenderPlan($usrid, $transamt);
 }
 public function borrowdetail()
 {
     $pre = C('DB_PREFIX');
     $borrow_id = intval($_GET['id']);
     $list = getBorrowInvest($borrow_id, $this->uid);
     $membertype = member_type($this->uid);
     if ($membertype['status'] == 1) {
         $isdanbao = 1;
     }
     $this->assign("isdanbao", $isdanbao);
     $this->assign("list", $list);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
Exemple #5
0
 protected function _initialize()
 {
     $loginconfig = FS("Webconfig/loginconfig");
     //判断快捷登录是否开启
     $this->assign("loginconfig", $loginconfig);
     $datag = get_global_setting();
     $this->glo = $datag;
     //供PHP里面使用
     $this->assign("glo", $datag);
     //公共参数
     $bconf = get_bconf_setting();
     $this->gloconf = $bconf;
     //供PHP里面使用
     $this->assign("gloconf", $bconf);
     if ($this->notneedlogin === true) {
         if (session("u_id")) {
             $this->uid = session("u_id");
             $this->assign('UID', $this->uid);
             $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
             $this->assign('unread', $unread);
             if (!in_array(strtolower(ACTION_NAME), array("actlogout", 'regsuccess', 'emailverify', 'verify', 'corpregister2'))) {
                 redirect(__APP__ . "/member/");
             }
             $res = M("members")->field("usrid,iscorp")->where("id={$this->uid}")->find();
             if (empty($res['usrid']) && $res['iscorp'] == 0) {
                 if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                     redirect(__APP__ . "/member/common/register2/");
                 }
             } else {
                 if (empty($res['usrid']) && $res['iscorp'] == 1) {
                     if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                         redirect(__APP__ . "/member/common/corpregister2/");
                     }
                 }
             }
         } else {
             $loginconfig = FS("Webconfig/loginconfig");
             $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']);
             if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) {
                 $vo = M('members')->field("id,user_name")->find($de_val);
                 if (is_array($vo)) {
                     foreach ($vo as $key => $v) {
                         session("u_{$key}", $v);
                     }
                     $this->uid = session("u_id");
                     $this->assign('UID', $this->uid);
                     $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
                     $this->assign('unread', $unread);
                     if (!in_array(strtolower(ACTION_NAME), array("actlogout", 'regsuccess', 'emailverify', 'verify', 'corpregister2'))) {
                         redirect(__APP__ . "/member/");
                     }
                     $res = M("members")->field("usrid,iscorp")->where("id={$this->uid}")->find();
                     if (empty($res['usrid']) && $res['iscorp'] == 0) {
                         if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                             redirect(__APP__ . "/member/common/register2/");
                         }
                     } else {
                         if (empty($res['usrid']) && $res['iscorp'] == 1) {
                             if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                                 redirect(__APP__ . "/member/common/corpregister2/");
                             }
                         }
                     }
                 } else {
                     cookie("Ukey", NULL);
                     cookie("Ukey2", NULL);
                 }
             }
         }
     } elseif (session("u_user_name")) {
         $this->uid = session("u_id");
         $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
         $this->assign('unread', $unread);
         $this->assign('UID', $this->uid);
         /*$res = M("members")->field("usrid,iscorp")->where("id={$this->uid}")->find();
         		if(empty($res['usrid']) && $res['iscorp']==0)
         		{
         			if(!in_array(strtolower(ACTION_NAME),array("actlogout","corpregister2","bind","corpbind")))
         			{
         				redirect(__APP__."/member/common/register2/");
         			}
         		}
         		else if(empty($res['usrid']) && $res['iscorp']==1)
         		{
         			if(!in_array(strtolower(ACTION_NAME),array("actlogout","corpregister2","bind","corpbind")))
         			{
         				redirect(__APP__."/member/common/corpregister2/");
         			}
         		}*/
     } else {
         $loginconfig = FS("Webconfig/loginconfig");
         $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']);
         if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) {
             $vo = M('members')->field("id,user_name")->find($de_val);
             if (is_array($vo)) {
                 foreach ($vo as $key => $v) {
                     session("u_{$key}", $v);
                 }
                 $this->uid = session("u_id");
                 $this->assign('UID', $this->uid);
                 $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
                 $this->assign('unread', $unread);
                 $res = M("members")->field("usrid,iscorp")->where("id={$this->uid}")->find();
                 if (empty($res['usrid']) && $res['iscorp'] == 0) {
                     if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                         redirect(__APP__ . "/member/common/register2/");
                     }
                 } else {
                     if (empty($res['usrid']) && $res['iscorp'] == 1) {
                         if (!in_array(strtolower(ACTION_NAME), array("actlogout", "corpregister2", "bind", "corpbind"))) {
                             redirect(__APP__ . "/member/common/corpregister2/");
                         }
                     }
                 }
             } else {
                 cookie("Ukey", NULL);
                 cookie("Ukey2", NULL);
             }
         } else {
             redirect(__APP__ . "/member/common/login/");
             exit;
         }
     }
     /***检测用户类型**/
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         $this->is_show_auto = 0;
     } else {
         $this->is_show_auto = 1;
     }
     /*****/
     $hasbind = hasbind($this->uid);
     session("hasbind", $hasbind);
     $this->assign("hasbind", $hasbind);
     if (method_exists($this, '_MyInit')) {
         $this->_MyInit();
     }
 }
Exemple #6
0
            case 6:
                $postername = $db->select_single_value("xebura_PROMOTER", "AF_PROMOTER_COMPANYNAME", " WHERE AF_PROMOTER_ID='" . $news_rows['AF_NEWS_POSTER_ID'] . "'");
                break;
            case 7:
                $postername = $db->select_single_value("xebura_VENUE", "AF_VENUE_NAME", " WHERE AF_VENUE_ID='" . $news_rows['AF_NEWS_POSTER_ID'] . "'");
                break;
            case 8:
                $postername = $db->select_single_value("xebura_BUYER", "AF_BUYER_COMPANYNAME", " WHERE AF_BUYER_ID='" . $news_rows['AF_NEWS_POSTER_ID'] . "'");
                break;
            default:
                $postername = "Unknown";
                break;
        }
        $temp['title'] = ucwords(html_script_escape($news_rows['AF_NEWS_TITLE']));
        $temp['news'] = truncate(ucfirst(html_script_escape(nl2br($news_rows['AF_NEWS_DESC']))), 50);
        $temp['poster'] = member_type($poster_aid);
        $temp['postername'] = ucwords(html_script_escape($postername));
        $postername = '';
        $temp['date'] = get_date_format($news_rows['AF_NEWS_DATE']);
        $temp['time'] = get_time_format($news_rows['AF_NEWS_TIME']);
        $posted_to_mid = $news_rows['AF_NEWS_POSTEDTO_MID'];
        $temp['posted_to_cid'] = encode($posted_to_mid);
        $posted_to_mid = '';
        if ($i == 0) {
            $news_last_update = $temp['date'];
        }
        $my_con_news[$i++] = $temp;
    }
}
$smarty->assign("NEWS_LASTUPDATED", $news_last_update);
$smarty->assign("NUM_CON_NEWS", $NUM_CON_NEWS);
Exemple #7
0
function page_contents()
{
    global $users, $teams, $publickey, $error;
    switch (member_type()) {
        case 'umpire':
            ?>
<p>Welcome Umpire... 
<p>The teams are as follows:

<?php 
            foreach ($teams as $team => $players) {
                print "<h2>{$team}</h2>\n<table width=\"100%\" border=1>\n";
                print "<tr><td>Name</td><td>Address</td><td>College</td><td>Allergies</td></tr>\n";
                foreach ($players as $player) {
                    print "<tr><td>" . $player['name'] . " (AKA " . $player['alias'] . ")</td><td>" . $player['address'] . "</td><td>" . $player['college'] . "</td><td>" . $player['alergies'] . "</td></tr>\n";
                }
                print "</table>\n";
            }
            break;
        case 'unregistered':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering. We have not yet received your disclaimer. Until this is received, your plays in the game may not count!
<p>You can download a <a href="disclaimer.pdf">disclaimer form here</a>.
<p>If you think you have supplied a disclaimer within the last 12 months and since 1st October 2012, please contact the <a href="mailto:secretary@oxfordassassinsguild.org.uk">Guild Secretary</a>.

<hr>
<?php 
            break;
        case 'noteam':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer. You have not yet been assigned a team... If the game should have started and you get this message, please E-mail <a href="mailto:umpire@oxfordassassinsguild.org.uk">The Umpire</a>

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<?php 
            break;
        case 'playing':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer.

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<p>Your team is as follows:

<?php 
            $team = $users[$_SESSION['uid']]['team'];
            $players = $teams[$team];
            print "<h2>{$team}</h2>\n<table width=\"100%\" border=1>\n";
            print "<tr><td>Name</td><td>Address</td><td>College</td><td>Allergies</td></tr>\n";
            foreach ($players as $player) {
                print "<tr><td>" . $player['name'] . " (AKA " . $player['alias'] . ")</td><td>" . $player['address'] . "</td><td>" . $player['college'] . "</td><td>" . $player['alergies'] . "</td></tr>\n";
            }
            print "</table>\n";
            break;
        case 'nc':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>You have not registered to play the current game. Hope you are having a happy and safe time without havign to watch over your shoulder all the time. Be sure to join us again soon...
<?php 
            break;
        default:
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p> Ever thought that life at Oxford would be so much more fun if people were trying to kill you? 
<br> Ever wondered if your post might be full of attack animals, ready to rip you to shreds? 
<br> Ever wanted to have a gun battle at 2AM in somebody else's college?
<p> Then the Oxford Guild of Assassins is for you...

<p>If you are already a member, login above to join in games (you will need to register if you have not done so already).

<p>If you would like to register, please <a href="passwd.php?action=newuser">register here</a>

<?php 
    }
}
Exemple #8
0
 public function newbie_check()
 {
     if (!$this->uid) {
         ajaxmsg('请先登录', 3);
         exit;
     }
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         ajaxmsg("您是" . $type['type'] . "用户不能投标", 3);
     }
     $money = intval($_POST['money']);
     $borrow_id = intval($_POST['borrow_id']);
     $m = M("member_money")->field('account_money,back_money,money_collect')->find($this->uid);
     $amoney = $m['account_money'] + $m['back_money'];
     $uname = session('u_user_name');
     //用户名称
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     //这里用来判断 是否投过此新手标 根据$uid
     $is_access = M('newbie_record')->getFieldByInvest_uid($this->uid, 'id');
     //$this->uid
     if ($is_access) {
         ajaxmsg("尊敬的财来用户,此标只能进行一次投标,您已经投过此标。", 3);
     }
     $binfo = M("newbie_bid")->find($borrow_id);
     //查询此新手标信息
     if ($binfo['min'] > $money) {
         $this->error("尊敬的{$uname},本标最低投标金额为{$binfo['min']}元,请重新输入投标金额", 3);
     } else {
         if ($binfo['max'] < $money) {
             $this->error("尊敬的{$uname},本标最高投标金额为{$binfo['max']}元,请重新输入投标金额", 3);
         }
     }
     //这里判断是否使用了红包
     $redvalue = intval($_POST['redvalue']);
     //红包面值
     if ($redvalue) {
         // $redtotal=M("active_redpacket")->field('sum(facevalue) as f')->where('owner='.$this->uid)->select();
         //查询红包总额
         $myown = $redvalue + $amoney;
         //包括我的红包
         if ($money > $myown) {
             $msg = '您的账户可用余额与所选代金券总额为' . $myown . ',不足支付所投资的金额' . $money;
             ajaxmsg($msg, 5);
         } else {
             $msg1 = '您的账户可用余额与红包总额为' . $myown . ',您确认投标' . $money . '元吗?';
             ajaxmsg($msg1, 1);
         }
     } else {
         if ($amoney < $money) {
             $msg = '尊敬的' . $uname . ',您准备投标' . $money . '元,但您的账户可用余额为' . $amoney . '元,请先去充值再投标';
             ajaxmsg($msg, 5);
             //$this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.",__APP__."/member/charge#fragment-1");
         } else {
             $msg1 = "尊敬的{$uname},您的账户可用余额为" . $amoney . ",您确认投标{$money}元吗?";
             ajaxmsg($msg1, 6);
         }
     }
     //这里判断是否使用了红包(结束)
 }
Exemple #9
0
?>
                    
                    <a href="<?php 
echo base_url() . index_page();
?>
user/blog.html" class="bntNext" <?php 
if (member_type() == 1) {
    ?>
data-reveal-id="f-upgradePage"<?php 
}
?>
>Mere <span class="red">&gt;</span></a>
                    <div class="clear"></div>
                    <a name="se-hvad-der-sker">&nbsp;</a>
                    <?php 
if (member_type() == 2) {
    ?>
                    <div class="blogerComment clearfix">
                        <h2>Se hvad der sker</h2>
                        <div class="clear"></div>
                        <?php 
    if ($activities) {
        ?>
                        <?php 
        foreach ($activities as $activity) {
            $profile_link = base_url() . index_page() . 'profiles/detail/' . $activity->id . '/' . $activity->name . '.html';
            ?>
                        <div class="commentItem">
                            <div class="f-l w420">
                                <a href="<?php 
            echo $profile_link;
Exemple #10
0
function page_contents()
{
    global $users, $teams, $publickey, $error;
    if (is_logged_in() && $_POST['action'] == "game_report") {
        list($junk, $victim) = explode(':', $_POST['victim']);
        list($junk, $victor) = explode(':', $_POST['victor']);
        if (isset($victim)) {
            if ($victim == $_SESSION['uid']) {
                $confirm_victim = 'true';
            } else {
                $confirm_victim = 'false';
            }
            $victim_text = $users[$victim]['name'] . " (AKA " . $users[$victim]['alias'] . ")";
        } else {
            $confirm_victim = 'null';
            $victim_text = "an unknown individual";
        }
        if (isset($victor)) {
            if ($victor == $_SESSION['uid']) {
                $confirm_victor = 'true';
            } else {
                $confirm_victor = 'false';
            }
            $victor_text = $users[$victor]['name'] . " (AKA " . $users[$victor]['alias'] . ")";
        } else {
            $confirm_victor = 'null';
            $victor_text = "an unknown individual";
        }
        $timestamp = date("Y-m-d H:i:s", mktime($_POST['when_hour'], $_POST['when_minute'], 0, $_POST['when_month'], $_POST['when_day'], $_POST['when_year']));
        include "src/connect.php";
        $sql = "INSERT INTO activity (reporter,timestamp,victor,victim,comment,contested,confirmed_victor,confirmed_victim)";
        $sql .= " values ('" . $_SESSION['uid'] . "','{$timestamp}','{$victor}','{$victim}','" . $_POST['comment'] . "',false,{$confirm_victor},{$confirm_victim})";
        $result = mysql_query($sql, $link) or die("user_admin:9: " . mysql_error());
        if ($confirm_victor == 'false') {
            $to = $users[$victor]['email'];
            $from = 'Oxford Guild of Assassins <*****@*****.**>';
            $subject = 'A kill requires your confirmation';
            $comment = $users[$_SESSION['uid']]['name'] . "(AKA " . $users[$_SESSION['uid']]['alias'] . ") has reported that you carried out the killing of {$victim_text}.\n\nThe following commentary was supplied:\n\"" . $_POST['comment'] . "\"\n\nPlease visit http://oxfordassassinsguild.org.uk/report.php to confirm or contest kill.\n\nThe IT Daemon.\n";
            $headers = "From: {$from}\r\n" . "BCc: {$from}\r\n" . 'X-Mailer: PHP/' . phpversion();
            mail($to, $subject, $comment, $headers);
        }
        if ($confirm_victim == 'false') {
            $to = $users[$victim]['email'];
            $from = 'Oxford Guild of Assassins <*****@*****.**>';
            $subject = 'A kill requires your confirmation';
            $comment = $users[$_SESSION['uid']]['name'] . "(AKA " . $users[$_SESSION['uid']]['alias'] . ") has reported that you were killed by {$victor_text}.\n\nThe following commentary was supplied:\n\"" . $_POST['comment'] . "\"\n\nPlease visit http://oxfordassassinsguild.org.uk/report.php to confirm or contest kill.\n\nThe IT Daemon.\n";
            $headers = "From: {$from}\r\n" . "BCc: {$from}\r\n" . 'X-Mailer: PHP/' . phpversion();
            mail($to, $subject, $comment, $headers);
        }
    }
    if (is_logged_in() && $_GET['action'] == "victim_confirm") {
        $getid = intval($_GET['id']);
        if ($getid > 0) {
            include "src/connect.php";
            $sql = "update activity set confirmed_victim=true where id=" . $getid;
            $result = mysql_query($sql, $link) or die("victim:1: " . mysql_error());
        }
        print "<p>Your death has been confirmed. You may take no further part in the game until you are resurrected (see game rules for details)\n";
    }
    if (is_logged_in() && $_GET['action'] == "victor_confirm") {
        $getid = intval($_GET['id']);
        if ($getid > 0) {
            include "src/connect.php";
            $sql = "update activity set confirmed_victor=true where id=" . $getid;
            $result = mysql_query($sql, $link) or die("victor:1: " . mysql_error());
        }
        print "<p>Your kill has been confirmed. Happy Hunting...\n";
    }
    if (is_logged_in() && $_GET['action'] == "contest") {
        $getid = intval($_GET['id']);
        if ($getid > 0) {
            include "src/connect.php";
            $sql = "update activity set contested=true where id=" . $getid;
            $result = mysql_query($sql, $link) or die("contest:1: " . mysql_error());
        }
        print "<p>Your wish to contest the kill has been recorded. The Umpire will be in touch shortly to resolve.\n";
    }
    include "src/connect.php";
    $sql = "SELECT * FROM activity";
    $result = mysql_query($sql, $link) or die("report:6: " . mysql_error());
    while ($line = mysql_fetch_array($result)) {
        if ($line['contested']) {
            $contested[] = $line;
        } else {
            if (!$line['confirmed_victim']) {
                $uc_victim[$line['victim']][] = $line;
            }
            if (!$line['confirmed_victor']) {
                $uc_victor[$line['victor']][] = $line;
            }
        }
    }
    foreach ($users as $player) {
        $who_to_email['pn:' . $player['id']] = $player['name'] . ' (AKA ' . $player['alias'] . ')';
        $who_to_email['pa:' . $player['id']] = $player['alias'] . ' (AKA ' . $player['name'] . ')';
    }
    asort($who_to_email);
    switch (member_type()) {
        case 'umpire':
            ?>
<p>Welcome Umpire... 

<p>The following reports are being contested:
<br>
<?php 
            foreach ($contested as $c) {
                print "<br>" . $users[$c['reporter']]['name'] . "(AKA " . $users[$c['reporter']]['alias'] . ")'s report that " . $users[$c['victor']]['name'] . "(AKA " . $users[$c['victor']]['alias'] . ") killed " . $users[$c['victim']]['name'] . "(AKA " . $users[$c['victim']]['alias'] . ") at " . $c['timestamp'];
            }
            break;
        case 'playing':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>You have the following unconfirmed kills:
<table width="100%" border=1>
<tr><td>Date and time</td><td>Victim</td><td>Kill report</td><td>&nbsp;</td></tr>
<?php 
            foreach ($uc_victor[$_SESSION['uid']] as $c) {
                print "<tr><td>" . $c['timestamp'] . "</td><td>" . $users[$c['victim']]['name'] . "(AKA " . $users[$c['victim']]['alias'] . ")</td><td>" . $c['comment'] . "(As reported by " . $users[$c['reporter']]['name'] . "(AKA " . $users[$c['reporter']]['alias'] . "))</td>";
                print '<td><a href="?action=victor_confirm&id=' . $c['id'] . '">Confirm</a><br><a href="?action=contest&id=' . $c['id'] . '">Contest</a></td></tr>';
            }
            ?>
</table>

<p>You have the following unconfirmed deaths:
<table width="100%" border=1>
<tr><td>Date and time</td><td>Victor</td><td>Kill report</td><td>&nbsp;</td></tr>
<?php 
            foreach ($uc_victim[$_SESSION['uid']] as $c) {
                print "<tr><td>" . $c['timestamp'] . "</td><td>" . $users[$c['victor']]['name'] . "(AKA " . $users[$c['victor']]['alias'] . ")</td><td>" . $c['comment'] . "(As reported by " . $users[$c['reporter']]['name'] . "(AKA " . $users[$c['reporter']]['alias'] . "))</td>";
                print '<td><a href="?action=victim_confirm&id=' . $c['id'] . '">Confirm</a><br><a href="?action=contest&id=' . $c['id'] . '">Contest</a></td></tr>';
            }
            ?>
</table>

<p><p>Use this form to make a game report:
<form method="POST" action="<?php 
            print $_SERVER['PHP_SELF'];
            ?>
">
<input type="hidden" name="action" value="game_report">
<br>Victor: <?php 
            selector('victor', $who_to_email, 'pn:' . $_SESSION['uid']);
            ?>
 
<br>Victim: <?php 
            selector('victim', $who_to_email, '');
            ?>
<br>When did this happen? <?php 
            dropdown_date('when');
            ?>
 
<br>Comment:<br><textarea name="comment" cols=60 rows=10></textarea>
<br><input type="submit" value="Send"></form>

<?php 
            break;
        case 'unregistered':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering. We have not yet received your disclaimer. Until this is received, your plays in the game may not count!
<p>You can download a <a href="disclaimer.pdf">disclaimer form here</a>.
<p>If you think you have supplied a disclaimer within the last 12 months and since 1st October 2012, please contact the <a href="mailto:secretary@oxfordassassinsguild.org.uk">Guild Secretary</a>.

<hr>
<?php 
            break;
        case 'noteam':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer. You have not yet been assigned a team... If the game should have started and you get this message, please E-mail <a href="mailto:umpire@oxfordassassinsguild.org.uk">The Umpire</a>

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<?php 
            break;
        case 'nc':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>You have not registered to play the current game. Hope you are having a happy and safe time without havign to watch over your shoulder all the time. Be sure to join us again soon...
<?php 
            break;
        default:
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p> Ever thought that life at Oxford would be so much more fun if people were trying to kill you? 
<br> Ever wondered if your post might be full of attack animals, ready to rip you to shreds? 
<br> Ever wanted to have a gun battle at 2AM in somebody else's college?
<p> Then the Oxford Guild of Assassins is for you...

<p>If you are already a member, login above to join in games (you will need to register if you have not done so already).

<p>If you would like to register, please <a href="passwd.php?action=newuser">register here</a>
<?php 
    }
}
Exemple #11
0
 public function post()
 {
     if (!$this->uid) {
         $this->error("请先登陆", __APP__ . "/member/common/login");
     }
     $vminfo = M('members')->field("user_leve,time_limit,is_borrow,is_vip")->find($this->uid);
     if ($vminfo['is_vip'] == 0) {
         //-------------为了让一个人可以发多个标的,进行了修改。by whh 2015-02-13--------------------------
         /*
         $_xoc = M('borrow_info')->where("borrow_uid={$this->uid} AND borrow_status in(0,2,4)")->count('id');
         if($_xoc>0)  $this->error("您有一个借款中的标,请等待审核",__APP__."/member/borrowin#fragment-1");
         */
         //if(!($vminfo['user_leve']>0 && $vminfo['time_limit']>time())) $this->error("请先通过VIP审核再发标",__APP__."/member/vip");
         if ($vminfo['is_borrow'] == 0) {
             $this->error("您目前不允许发布借款,如需帮助,请与客服人员联系!");
             $this->assign("waitSecond", 3);
         }
         $vo = getMemberDetail($this->uid);
         if ($vo['province'] == 0 && $vo['province_now '] == 0 && $vo['province_now '] == 0 && $vo['city'] == 0 && $vo['city_now'] == 0) {
             $this->error("请先填写个人详细资料后再发标", __APP__ . "/member/memberinfo#fragment-1");
         }
     }
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         $this->error("您是" . $type['type'] . "用户不能发布借款");
         die;
     }
     $gtype = text($_GET['type']);
     $vkey = md5(time() . $gtype);
     switch ($gtype) {
         case "normal":
             //普通标
             $borrow_type = 1;
             break;
         case "vouch":
             //新担保标
             $borrow_type = 2;
             break;
         case "second":
             //秒还标
             $this->assign("miao", 'yes');
             $borrow_type = 3;
             break;
         case "net":
             //净值标
             $borrow_type = 4;
             break;
         case "mortgage":
             //抵押标
             $borrow_type = 5;
             break;
     }
     session($vkey, $borrow_type, 3600);
     $borrow_duration_day = explode("|", $this->glo['borrow_duration_day']);
     $day = range($borrow_duration_day[0], $borrow_duration_day[1]);
     $day_time = array();
     foreach ($day as $v) {
         $day_time[$v] = $v . "天";
     }
     $borrow_duration = explode("|", $this->glo['borrow_duration']);
     $month = range($borrow_duration[0], $borrow_duration[1]);
     $month_time = array();
     foreach ($month as $v) {
         $month_time[$v] = $v . "个月";
     }
     $rate_lixt = explode("|", $this->glo['rate_lixi']);
     $borrow_config = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $this->assign("borrow_use", $this->gloconf['BORROW_USE']);
     $this->assign("borrow_min", $this->gloconf['BORROW_MIN']);
     $this->assign("borrow_max", $this->gloconf['BORROW_MAX']);
     $this->assign("borrow_time", $this->gloconf['BORROW_TIME']);
     $this->assign("BORROW_TYPE", $borrow_config['BORROW_TYPE']);
     $this->assign("borrow_type", $borrow_type);
     $this->assign("borrow_day_time", $day_time);
     $this->assign("borrow_month_time", $month_time);
     $this->assign("repayment_type", $borrow_config['REPAYMENT_TYPE']);
     $this->assign("vkey", $vkey);
     $this->assign("rate_lixt", $rate_lixt);
     $this->display();
 }
Exemple #12
0
<!--Check utf-8 Cường-->
<div id="wraNav" class="clearfix">
  <div id="logo"><a href="<?php 
echo base_url() . index_page();
?>
index.html">Sugardating</a></div>
  <ul id="mainNav">
    <li id="srart_active"><a href="<?php 
echo base_url() . index_page();
?>
index.html">Start</a></li>
    <li id="minprofil_active"><a href="<?php 
echo base_url() . index_page();
?>
user/owner.html" <?php 
if (!member_type()) {
    ?>
data-reveal-id="f-errorPage"<?php 
}
?>
>Min Profil</a></li>
    <li id="sugarshop_active"><a href="<?php 
echo base_url() . index_page();
?>
sugarshop/index.html">Sugarshop</a></li>
    <li id="faq_active"><a href="<?php 
echo base_url() . index_page();
?>
faq.html">FAQ</a></li>
    <li id="help_active"><a href="<?php 
echo base_url() . index_page();
Exemple #13
0
 public function zwborrowpaying()
 {
     $membertype = member_type($this->uid);
     if ($membertype['status'] == 1) {
         $map['danbao'] = $this->uid;
     } else {
         $map['borrow_uid'] = $this->uid;
     }
     $map['borrow_status'] = 6;
     //		$map['status'] = 7;
     $list = getBorrowList2($map, 8);
     $this->assign("list", $list['list']);
     $this->assign("pagebar", $list['page']);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
Exemple #14
0
 public function investmoney()
 {
     //if(!$this->uid) exit;
     if (!$this->uid) {
         ajaxmsg('请先登录', 3);
         exit;
     }
     $type = member_type($this->uid);
     if ($type['status'] != 3) {
         ajaxmsg("您是" . $type['type'] . "用户不能投标", 3);
     }
     $money = intval($_POST['money']);
     $borrow_id = intval($_POST['borrow_id']);
     $m = M("member_money")->field('account_money,back_money,money_collect')->find($this->uid);
     $amoney = $m['account_money'] + $m['back_money'];
     $uname = session('u_user_name');
     if ($amoney < $money) {
         $this->error("尊敬的{$uname},您准备投标{$money}元,但您的账户可用余额为{$amoney}元,请先去充值再投标.", __APP__ . "/member/charge#fragment-1");
     }
     $vm = getMinfo($this->uid, 'm.pin_pass,mm.account_money,mm.back_money,mm.money_collect');
     $pin_pass = $vm['pin_pass'];
     $pin = md5($_POST['pin']);
     //if($pin<>$pin_pass) $this->error("支付密码错误,请重试");
     $binfo = M("borrow_info")->field('borrow_money,borrow_max,has_borrow,has_vouch,borrow_type,borrow_min,money_collect')->find($borrow_id);
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     if ($binfo['money_collect'] > 0) {
         if ($m['money_collect'] < $binfo['money_collect']) {
             ajaxmsg("此标设置有投标待收金额限制,您账户里必须有足够的待收才能投此标", 3);
         }
     }
     ////////////////////////////////////待收金额限制 2013-08-26  fan///////////////////
     //投标总数检测
     $capital = M('borrow_investor')->where("borrow_id={$borrow_id} AND investor_uid={$this->uid}")->sum('investor_capital');
     if ($capital + $money > $binfo['borrow_max'] && $binfo['borrow_max'] > 0) {
         $xtee = $binfo['borrow_max'] - $capital;
         $this->error("您已投标{$capital}元,此投上限为{$binfo['borrow_max']}元,你最多只能再投{$xtee}", 3);
     }
     //if($binfo['has_vouch']<$binfo['borrow_money'] && $binfo['borrow_type'] == 2) $this->error("此标担保还未完成,您可以担保此标或者等担保完成再投标");
     $need = $binfo['borrow_money'] - $binfo['has_borrow'];
     $caninvest = $need - $binfo['borrow_min'];
     if ($money > $caninvest && $need == 0) {
         $msg = "尊敬的{$uname},此标已被抢投满了,下次投标手可一定要快呦!";
         $this->error($msg);
     }
     if ($binfo['borrow_min'] - $money > 0) {
         $this->error("尊敬的{$uname},本标最低投标金额为{$binfo['borrow_min']}元,请重新输入投标金额", 3);
     }
     if ($need - $money < 0) {
         $this->error("尊敬的{$uname},此标还差{$need}元满标,您最多只能再投{$need}元", 3);
     } else {
         /////////////////////////////////////////////////////汇付托管 2014-10-09///////////////////////////////////////////////////////////////
         $pre = C('DB_PREFIX');
         $info1 = M("members")->field("usrid")->where("id=" . $this->uid)->find();
         $info2 = M("members m")->field("m.usrid")->join("{$pre}borrow_info s ON s.borrow_uid=m.id")->where("s.id = {$borrow_id}")->find();
         $usrid = $info1['usrid'];
         $borrowerid = $info2['usrid'];
         $transamt = $money;
         $type = "S";
         //表示散标
         $borrowid = $borrow_id;
         import("ORG.Huifu.Huifu");
         $huifu = new Huifu();
         $huifu->initiativeTender($usrid, $transamt, $borrowerid, $borrowid);
         /////////////////////////////////////////////////////汇付托管 END///////////////////////////////////////////////////////////////
         //$done = investMoney($this->uid,$borrow_id,$money);
     }
     /*if($done===true) {
     			$this->success("恭喜成功投标{$money}元");
     		}else if($done){
     			$this->error($done);
     		}else{
     			$this->error("对不起,投标失败,请重试!");
     		}*/
 }
Exemple #15
0
function page_contents()
{
    global $users, $teams, $publickey, $error;
    if (is_logged_in() && $_POST['action'] == "email_whole_team") {
        $subject = "[Assassins Game] " . $_POST['subject'];
        $comment = $_POST['email_text'];
        $headers = 'From: ' . $users[$_SESSION['uid']]['alias'] . ' <' . $users[$_SESSION['uid']]['email'] . '>' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
        mail('*****@*****.**', $subject, $comment, $headers);
        foreach ($teams as $team => $players) {
            if ($team == $users[$_SESSION['uid']]['team']) {
                foreach ($players as $player) {
                    $to = $player['email'];
                    mail($to, $subject, $comment, $headers);
                }
            }
        }
    }
    if ($users[$_SESSION['uid']]['team'] == "Umpire" && $_POST['action'] == "email_from_umpire") {
        list($email_type, $email_to) = explode(':', $_POST['who_to_email']);
        $subject = "[Assassins Game] " . $_POST['subject'];
        $comment = $_POST['email_text'];
        $headers = 'From: The Umpire <*****@*****.**>' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
        foreach ($teams as $team => $players) {
            foreach ($players as $player) {
                $to = $player['email'];
                if ($email_type == 'e' || $email_type == 't' && $email_to == $team || $email_type == 'pa' && $email_to == $player['id'] || $email_type == 'pn' && $email_to == $player['id']) {
                    mail($to, $subject, $comment, $headers);
                }
            }
        }
    }
    foreach ($teams as $team => $players) {
        foreach ($players as $player) {
            $who_to_email['pn:' . $player['id']] = $player['name'] . ' (AKA ' . $player['alias'] . ')';
            $who_to_email['pa:' . $player['id']] = $player['alias'] . ' (AKA ' . $player['name'] . ')';
        }
    }
    arsort($who_to_email);
    $team_names = array_keys($teams);
    rsort($team_names);
    foreach ($team_names as $t) {
        $who_to_email['t:' . $t] = "TEAM {$t}";
    }
    $who_to_email['e:e'] = "Everyone";
    $who_to_email = array_reverse($who_to_email);
    switch (member_type()) {
        case 'umpire':
            ?>
<p>Welcome Umpire... 

<p>E-mail people taking part in the game:
<form method="POST" action="<?php 
            print $_SERVER['PHP_SELF'];
            ?>
">
<input type="hidden" name="action" value="email_from_umpire">
<br>Who do you want to E-mail? <?php 
            selector('who_to_email', $who_to_email, 'e:e');
            ?>
<br>Subject: <input size=60 type="text" name="subject" value="A message from the Umpire">
<br>Text:<br><textarea name="email_text" cols=60 rows=10></textarea>
<br><input type="submit" value="Send"></form>

<?php 
            break;
        case 'unregistered':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering. We have not yet received your disclaimer. Until this is received, your plays in the game may not count!
<p>You can download a <a href="disclaimer.pdf">disclaimer form here</a>.
<p>If you think you have supplied a disclaimer within the last 12 months and since 1st October 2012, please contact the <a href="mailto:secretary@oxfordassassinsguild.org.uk">Guild Secretary</a>.

<hr>
<?php 
            break;
        case 'noteam':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer. You have not yet been assigned a team... If the game should have started and you get this message, please E-mail <a href="mailto:umpire@oxfordassassinsguild.org.uk">The Umpire</a>

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<?php 
            break;
        case 'playing':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p><p>E-mail your team:
<form method="POST" action="<?php 
            print $_SERVER['PHP_SELF'];
            ?>
">
<input type="hidden" name="action" value="email_whole_team">
<br>Subject: <input size=60 type="text" name="subject" value="A message from <?php 
            print $users[$_SESSION['uid']]['alias'];
            ?>
">
<br>Text:<br><textarea name="email_text" cols=60 rows=10></textarea>
<br><input type="submit" value="Send"></form>

<p><p>To contact any other team, E-mail <a href="mailto:umpire@oxfordassassinsguild.org.uk">The Umpire</a> 
<?php 
            break;
        case 'nc':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>You have not registered to play the current game. Hope you are having a happy and safe time without havign to watch over your shoulder all the time. Be sure to join us again soon...
<?php 
            break;
        default:
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p> Ever thought that life at Oxford would be so much more fun if people were trying to kill you? 
<br> Ever wondered if your post might be full of attack animals, ready to rip you to shreds? 
<br> Ever wanted to have a gun battle at 2AM in somebody else's college?
<p> Then the Oxford Guild of Assassins is for you...

<p>If you are already a member, login above to join in games (you will need to register if you have not done so already).

<p>If you would like to register, please <a href="passwd.php?action=newuser">register here</a>
<?php 
    }
}
                        </div>
                        <?php 
echo $all_link;
?>
                    </div>
                    <!--.blogerComment--> 
                </div>
                <!--.bloger--> 
            </div>
            
            <div>
            <a href="<?php 
echo base_url() . index_page();
?>
user/adddating.html" class="bt-createdating" <?php 
if (member_type() == 1) {
    ?>
data-reveal-id="f-upgradePage"<?php 
}
?>
>Opret nyt VIP/Date opslag</a> 
            </div>
            <!--.profilowner--> 
        </div>
        <!--.info-profil--> 
    </div>
    <!--contentLeft--> 
    <?php 
echo modules::run('banner/banner/index');
?>
 
Exemple #17
0
            $result = mysql_query($sql, $link) or die("team_update:1: " . mysql_error());
            $sql = "update players set target='" . $teams[$v][0]['target'] . "' where id=" . $uid;
            $result = mysql_query($sql, $link) or die("team_update:2: " . mysql_error());
            $repoll = true;
        }
        if ($kk == 'targets' && $users[$uid]['target'] != $v) {
            print "<li>Updating targets for team " . $users[$uid]['team'] . " from " . $users[$uid]['target'] . " to {$v}...\n";
            include "src/connect.php";
            $sql = "update players set target='{$v}' where team='" . $users[$uid]['team'] . "'";
            $result = mysql_query($sql, $link) or die("team_update:1: " . mysql_error());
            $repoll = true;
        }
    }
    print "</ul>\n";
}
if (!$ingame && member_type() == 'nc' && $_POST['action'] == 'gameregister') {
    print "<p>Registering you for the game...\n";
    $uid = $_SESSION['uid'];
    include "src/connect.php";
    $sql = "update players set team='NOTEAM' where id=" . $uid;
    $result = mysql_query($sql, $link) or die("gameregister:1: " . mysql_error());
    $repoll = true;
}
if ($repoll) {
    include "src/connect.php";
    $sql = "SELECT * FROM players";
    $result = mysql_query($sql, $link) or die("repoll:1: " . mysql_error());
    unset($users, $usernames, $teams);
    while ($line = mysql_fetch_array($result)) {
        $users[$line['id']] = $line;
        $usernames[$line['email']] = $line;
Exemple #18
0
function page_contents()
{
    global $users, $teams, $publickey, $error, $ingame, $userid;
    if (is_logged_in() && $_POST['action'] == "disclaimer_process") {
        $getid = intval($userid);
        include "src/connect.php";
        $sql = "update players set disclaimer='" . date("Y-m-d H:i:s") . "' where id=" . $getid;
        $result = mysql_query($sql, $link) or die("secretary:1: " . mysql_error());
    }
    switch (member_type()) {
        case 'umpire':
            ?>
<p>Welcome Umpire... 
<p>The Rules can be found by <a href="rules.docx">following this link</a>. E-mail any updates to pilly...
<p>The teams are listed below. You can change which team a person is on by changing what is written in the right hand column and then clicking the "update" button below.
<form action="" method="POST">
<input type="hidden" name="action" value="team_update">
<?php 
            foreach ($teams as $team => $players) {
                print "<h2>{$team}</h2>\n<p>Targets (a comma separated list...): <input type=\"text\" name=\"targets_" . $players[0]['id'] . "\" size=20 value=\"" . $players[0]['target'] . "\"/><table width=\"100%\" border=1>\n";
                print "<tr><td>Name</td><td>Address</td><td>College</td><td>Allergies</td><td>&nbsp;</td></tr>\n";
                foreach ($players as $player) {
                    print "<tr><td>" . $player['name'] . " (AKA " . $player['alias'] . ")</td><td>" . $player['address'] . "</td><td>" . $player['college'] . "</td><td>" . $player['alergies'] . "</td><td><input type=\"text\" name=\"team_" . $player['id'] . "\" size=10 value=\"{$team}\"/></td></tr>\n";
                }
                print "</table>";
            }
            print "<input type=\"submit\" value=\"Update\"></form>";
            break;
        case 'unregistered':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering. You appear not to have accepted a disclaimer this year. Please read the following:

<h2>Disclaimer</h2>
<p>The Oxford Guild of Assassins neither commits nor encourages the
inhuming of people in reality! Our assassination games are for
amusement only and are good-willed events. Participants must take
great care not to harm themselves or others, and furthermore not to
damage property or disrupt public, University, or college business.
<br>Even so, there is a risk of accidental injury occurring during
participation in Guild games. This is unlikely, but by joining the Guild
you agree that these injuries may occur, and that you will not hold
the Guild responsible. At all times, you are solely responsible for your
actions.
<br>If you genuinely have a desire to kill people, the Guild is not for you
and suggests you seek psychiatric help. Post-haste.

<form method="POST" action="<?php 
            print $_SERVER['PHP_SELF'];
            ?>
">
<p><input type="checkbox" name="action" value="disclaimer_process"> Please tick this box to indicate that you, <?php 
            print $users[$userid]['name'] . " (AKA " . $users[$userid]['alias'] . ") of " . $users[$userid]['college'] . ", ";
            ?>
 accept the above disclaimer and that you participate in all Guild activities at your own risk.
<br><input type="submit" value="I accept the disclaimer">
</form>

<?php 
            break;
        case 'noteam':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer. You have not yet been assigned a team... If the game should have started and you get this message, please E-mail <a href="mailto:umpire@oxfordassassinsguild.org.uk">The Umpire</a>

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<?php 
            break;
        case 'playing':
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p>Thank you for registering and returning your disclaimer.

<p>Please <a href="rules.docx">read the rules by following this link</a>.

<p>Further details about the game can be found above...

<?php 
            break;
        case 'nc':
            print "<h1>The Oxford Guild of Assassins</h1>\n";
            if ($ingame) {
                print "<p>You have not registered to play the current game. Hope you are having a happy and safe time without having to watch over your shoulder all the time. Be sure to join us again soon...\n";
            } else {
                ?>
<form action="" method="post">
<input type="hidden" name="action" value="gameregister">
<input type="submit" value="Click here to register for the next game..." />
</form>

<?php 
            }
            break;
        default:
            ?>

<h1>The Oxford Guild of Assassins</h1>

<p> Ever thought that life at Oxford would be so much more fun if people were trying to kill you? 
<br> Ever wondered if your post might be full of attack animals, ready to rip you to shreds? 
<br> Ever wanted to have a gun battle at 2AM in somebody else's college?
<p> Then the Oxford Guild of Assassins is for you...

<p><a href="Termcard.pdf">Click here for this term's Termcard...</a>

<p>If you are already a member, login above to join in games.

<p>If you would like to register, please <a href="passwd.php?action=newuser">register here</a>

<?php 
    }
}