Esempio n. 1
0
function get_cost_price($cost_price)
{
    $options['who_can_see_cost_price'] = get_option(array('option_group' => 'product', 'option_key' => 'who_can_see_cost_price'));
    if (get_the_current_user('role') > $options['who_can_see_cost_price']['option_value']) {
        return get_money('0');
    } else {
        return get_money($cost_price);
    }
}
Esempio n. 2
0
function get_account_balance($balance)
{
    $options['who_can_see_account_balance'] = get_option(array('option_group' => 'account', 'option_key' => 'who_can_see_account_balance'));
    if (get_the_current_user('role') > $options['who_can_see_account_balance']['option_value']) {
        return get_money(0);
    } else {
        return get_money($balance);
    }
}
Esempio n. 3
0
/**
*文章检查
**/
function check_article(&$rsdb)
{
    global $fidDB, $timestamp, $web_admin, $groupdb, $timestamp, $lfjid, $lfjuid, $fid, $id, $aid, $buy, $lfjdb, $webdb, $pre, $db;
    if (!$rsdb) {
        showerr("文章不存在");
    }
    //if( $fidDB[allowviewcontent]&&!in_array($fidDB[M_keyword],array('mv','download')) )
    if ($fidDB[allowviewcontent]) {
        if (!$web_admin && !in_array($groupdb[gid], explode(",", $fidDB[allowviewcontent]))) {
            showerr("你所在用户组不允许浏览文章内容");
        }
    }
    //if( $rsdb[allowview]&&!in_array($fidDB[M_keyword],array('mv','download')) )
    if ($rsdb[allowview]) {
        if (!$web_admin && !in_array($groupdb[gid], explode(",", $rsdb[allowview]))) {
            showerr("本文,你所在用户组不允许浏览文章内容");
        }
    }
    //设置了开始浏览日期限制
    if ($rsdb[begintime] && $timestamp < $rsdb[begintime]) {
        $rsdb[begintime] = date("Y-m-d H:i:s", $rsdb[begintime]);
        if ($web_admin) {
            Remind_msg("本文只有到了“{$rsdb[begintime]}”那个时间才可以查看,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            showerr("<font color='red' ><u>很抱歉,发布者设置了本文内容只有到了“{$rsdb[begintime]}”那个时间才可以查看</u></font>");
        }
    }
    //设置了失效浏览日期限制
    if ($rsdb[endtime] && $timestamp > $rsdb[endtime]) {
        $rsdb[endtime] = date("Y-m-d H:i:s", $rsdb[endtime]);
        if ($web_admin) {
            Remind_msg("本文内容最后查看期限是“{$rsdb[endtime]}”,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            showerr("<font color='red' ><u>很抱歉,发布者设置了本文内容最后查看期限是“{$rsdb[endtime]}”,现在已超过了这个期限,所以不能查看</u></font>");
        }
    }
    if ($rsdb[yz] == 2) {
        if ($web_admin) {
            Remind_msg("回收站的内容不可以查看,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            showerr("回收站的内容你不可以查看");
        }
    }
    //未审核
    if ($rsdb[yz] == 0 && (!$lfjid || $lfjuid != $rsdb[uid])) {
        if ($web_admin) {
            Remind_msg("本文还没通过验证,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            showerr("<font color='red' ><u>很抱歉,本文还没通过验证,你不能查看</u></font>");
        }
    }
    //定时发布
    if ($rsdb[yz] == 3 && $rsdb[begintime] > $timestamp) {
        if ($web_admin) {
            Remind_msg("本文为定时发布,时间没到,不能查看,因为你是管理员,所以可以查看,其他人是不能查看的");
        } elseif ($lfjuid && $lfjuid == $rsdb[uid]) {
            Remind_msg("本文为定时发布,时间没到,不能查看,因为你是作者,所以可以查看,其他人是不能查看的");
        } else {
            showerr("<font color='red' ><u>本文为定时发布,时间没到,不能查看</u></font>");
        }
    } elseif ($rsdb[yz] == 3) {
        corntab_post('DE', $rsdb[aid]);
        //处理发布
    }
    //跳转到外面
    if ($rsdb[jumpurl]) {
        echo "页面正在跳转中,请稍候...<META HTTP-EQUIV=REFRESH CONTENT='0;URL={$rsdb['jumpurl']}'>";
        exit;
    }
    //文章密码
    if ($rsdb[passwd]) {
        if ($web_admin) {
            Remind_msg("本文设置了密码,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            if ($_POST[password] && $_POST[TYPE] == 'article') {
                if ($_POST[password] != $rsdb[passwd]) {
                    echo "<A HREF=\"bencandy.php?fid={$fid}&NeedCheck=1&aid={$aid}\">密码不正确,点击返回</A>";
                    exit;
                } else {
                    setcookie("article_passwd_{$id}", $rsdb[passwd]);
                    $_COOKIE["article_passwd_{$id}"] = $rsdb[passwd];
                }
            }
            if ($_COOKIE["article_passwd_{$id}"] != $rsdb[passwd]) {
                echo "<CENTER><form name=\"form1\" method=\"post\" action=\"\">请输入文章密码:<input type=\"password\" name=\"password\"><input type=\"hidden\" name=\"TYPE\" value=\"article\"><input type=\"hidden\" name=\"NeedCheck\" value=\"1\"><input type=\"submit\" name=\"Submit\" value=\"提交\"></form></CENTER>";
                exit;
            }
        }
    }
    //栏目密码
    if ($makehtml != 2 && $fidDB[passwd]) {
        if ($web_admin) {
            Remind_msg("本栏目设置了密码,因为你是管理员,所以可以查看,其他人是不能查看的");
        } else {
            if ($_POST[password] && $_POST[TYPE] == 'sort') {
                if ($_POST[password] != $fidDB[passwd]) {
                    echo "<A HREF=\"?fid={$fid}&aid={$aid}\">密码不正确,点击返回</A>";
                    exit;
                } else {
                    setcookie("sort_passwd_{$fid}", $fidDB[passwd]);
                    $_COOKIE["sort_passwd_{$fid}"] = $fidDB[passwd];
                }
            }
            if ($_COOKIE["sort_passwd_{$fid}"] != $fidDB[passwd]) {
                echo "<CENTER><form name=\"form1\" method=\"post\" action=\"\">请输入栏目密码:<input type=\"password\" name=\"password\"><input type=\"hidden\" name=\"TYPE\" value=\"sort\"><input type=\"hidden\" name=\"NeedCheck\" value=\"1\"><input type=\"submit\" name=\"Submit\" value=\"提交\"></form></CENTER>";
                exit;
            }
        }
    }
    //积分处理
    //if( ($rsdb[money]=abs($rsdb[money]))&&!in_array($fidDB[M_keyword],array('mv','download')) ){
    if ($rsdb[money] = abs($rsdb[money])) {
        if ($webdb[view_sell_article]) {
            $content = preg_replace('/<([^<]*)>/is', "", $rsdb[content]);
            $num = floor(strlen($content) / 3);
            //$content = substr($content,0,$num);
            $content = mb_substr($content, 0, $num, 'gb2312');
        }
        if (!$lfjuid) {
            if ($webdb[view_sell_article]) {
                $rsdb[content] = "{$content}<div style='border:1px solid red;padding:10px;background:eee;'>请先登录,需要支付{$rsdb[money]}{$webdb[MoneyName]}才能查看全部内容</div>";
                //$rsdb[content] = substr($content,0,-7);
            } else {
                showerr("请先登录,需要支付{$rsdb[money]}{$webdb[MoneyName]}才能查看");
            }
        } elseif ($web_admin) {
            Remind_msg("本文设置了收费,因为你是管理员,所以可以查看,其他人是不能查看的");
        } elseif ($lfjuid == $rsdb[uid]) {
            Remind_msg("本文设置了收费,因为你是发布者,所以可以查看,其他人是不能查看的");
        } elseif (!strstr($rsdb[buyuser], ",{$lfjid},")) {
            $lfjdb[money] = get_money($lfjuid);
            if ($lfjdb[money] < $rsdb[money]) {
                if ($webdb[view_sell_article]) {
                    $rsdb[content] = "{$content}<div style='border:1px solid red;padding:10px;background:eee;'>你的{$webdb[MoneyName]}不足{$rsdb['money']},不能查看全部内容</div>";
                } else {
                    showerr("你的{$webdb[MoneyName]}不足{$rsdb['money']}");
                }
            } elseif ($buy == 1) {
                add_user($lfjuid, "-{$rsdb['money']}", '查看文章内容扣分');
                add_user($rsdb[uid], "{$rsdb['money']}", '文章被浏览奖分');
                $rsdb[buyuser] = $rsdb[buyuser] ? ",{$lfjid}{$rsdb[buyuser]}" : ",{$lfjid},";
                $erp = get_id_table($id);
                $db->query("UPDATE {$pre}article{$erp} SET buyuser='******'buyuser']}' WHERE aid={$id}");
                refreshto("bencandy.php?fid={$fid}&NeedCheck=1&id={$id}", "购买成功,你刚刚消耗了{$webdb[MoneyName]}{$rsdb[money]}{$webdb[MoneyDW]}", 3);
            } else {
                if ($webdb[view_sell_article]) {
                    $rsdb[content] = "{$content}<div style='border:1px solid red;padding:10px;background:eee;'>你需要消耗{$webdb[MoneyName]}{$rsdb[money]}{$webdb[MoneyDW]}才有权限查看全部内容,是否继续<br><br>[<A HREF='bencandy.php?fid={$fid}&buy=1&NeedCheck=1&id={$id}'>我要继续</A>]</div>";
                } else {
                    showerr("你需要消耗{$webdb[MoneyName]}{$rsdb[money]}{$webdb[MoneyDW]}才有权限查看,是否继续<br><br>[<A HREF='bencandy.php?fid={$fid}&buy=1&NeedCheck=1&id={$id}'>我要继续</A>]");
                }
            }
        }
    }
}
Esempio n. 4
0
<?php

require "global.php";
if (!$lfjid) {
    showerr("你还没登录");
}
$lfjdb[money] = get_money($lfjuid);
$webdb[MoneyRatio] = intval($webdb[MoneyRatio]);
if ($action == "del_record") {
    $db->query("DELETE FROM {$pre}olpay WHERE uid='{$lfjuid}' AND id='{$id}'");
}
if ($job == "record") {
    if ($page < 1) {
        $page = 1;
    }
    $rows = 20;
    $min = ($page - 1) * $rows;
    unset($listdb);
    $showpage = getpage("{$pre}olpay", "WHERE uid='{$lfjuid}'", "?job={$job}", $rows);
    $query = $db->query("SELECT * FROM {$pre}olpay WHERE uid='{$lfjuid}' ORDER BY id DESC LIMIT {$min},{$rows}");
    while ($rs = $db->fetch_array($query)) {
        $rs[ifpay] = $rs[ifpay] ? "<font color=red>支付成功</font>" : "支付失败";
        $rs[posttime] = date("Y-m-d H:i:s", $rs[posttime]);
        if ($rs[banktype] == 'tenpay') {
            $rs[banktype] = "财付通";
        } elseif ($rs[banktype] == 'alipay') {
            $rs[banktype] = "支付宝";
        } elseif ($rs[banktype] == '99pay') {
            $rs[banktype] = "快钱";
        } elseif ($rs[banktype] == 'yeepay') {
            $rs[banktype] = "易宝支付";
Esempio n. 5
0
</h4>
        <div class="text fs-16">
        	<p><a href="<?php 
echo site_url('account/get_account/' . $account['id']);
?>
"><?php 
echo $account['name'];
?>
</a></p>
            
            <strong><?php 
lang('Balance');
?>
</strong>:
            <?php 
echo get_money($account['balance']);
?>
        </div>
    </span>
</div> <!-- /.col-md-4 -->
</div> <!-- /.row -->

<div class="h20"></div>


<script>
$('.openModal-account_list').click(function() {
	$('#modal-account_list').click();
});

Esempio n. 6
0
					<tr>
						<td><a href="' . site_url('product/get_product/' . $product['id']) . '" target="_blank">' . $product['code'] . '</a></td>
						<td class="text-center">' . $item['quantity'] . ' * ' . get_money($item['quantity_price']) . '</td>
						<td class="text-right">' . get_money($item['total']) . '</td>
						<td class="text-center">% (' . $item['tax_rate'] . ') ' . get_money($item['tax']) . '</td>
						<td class="text-right">' . get_money($item['sub_total']) . '</td>
					</tr>';
    }
    $plus_content = $plus_content . '</tbody>
				<tfoot>
					<tr class="fs-14 no-strong">
						<th class="text-center no-strong">' . get_lang('Grand Total') . '</th>
						<th class="text-center no-strong text-danger">' . $invoice['quantity'] . '</th>
						<th colspan="1" class="text-right no-strong text-danger">' . get_money($invoice['total']) . '</th>
						<th colspan="1" class="text-center no-strong text-danger">' . get_money($invoice['tax']) . '</th>
						<th class="text-right fs-16 no-strong text-danger">' . get_money($invoice['grand_total']) . '</th>
					</tr>
				</tfoot>
			</table>
			</div>
			<br />';
    $custom_title = get_lang('Invoice') . ': #' . $invoice['id'] . ' [' . $account['name'] . ']';
}
?>
        
    
    	<?php 
if (isset($_POST['new_message']) and is_log()) {
    $continue = true;
    $this->form_validation->set_rules('receiver_id', get_lang('Receiver'), 'required');
    $this->form_validation->set_rules('title', get_lang('Title'), 'required|min_length[3]|max_length[50]');
Esempio n. 7
0
    <tfoot>
    	<tr>
        	<td></td>
            <td></td>
            <td></td>
            <td></td>
            <td class="fs-16"><?php 
echo $km['km'];
?>
 <?php 
lang('km');
?>
</td>
            <td></td>
            <td class="text-right fs-16"><?php 
echo get_money($sub_total['total']);
?>
</td>
        </tr>
    </tfoot>
</table>

	<?php 
// update mileage
$this->db->where('id', $car['id']);
$this->db->update('p_cars', array('now_mileage' => $car['old_mileage'] + $km['km']));
?>

</div> <!-- /.transactions -->

Esempio n. 8
0
function get_project_list($data = '')
{
    $ci =& get_instance();
    $accounts = get_account_list_for_array();
    $ci->db->where('status', 1);
    $query = $ci->db->get('p_projects')->result_array();
    ?>
    <table cellpadding="0" cellspacing="0" border="0" class="table table-hover table-bordered table-condensed dataTable_noExcel_noLength_noInformation">
    	<thead>
        	<tr>
            	<th width="1"></th>
                <th><?php 
    lang('Name');
    ?>
</th>
                <th><?php 
    lang('Barcode Code');
    ?>
</th>
                <th><?php 
    lang('Account Card');
    ?>
</th>
                <th><?php 
    lang('Support Status');
    ?>
</th>
                <th><?php 
    lang('Response Time');
    ?>
</th>
            </tr>
        </thead>
        <tbody>
    <?php 
    foreach ($query as $account) {
        ?>
    	<tr>
        	<td width="1">
            	<a href="javascript:;" class="btn btn-xs btn-default btnSelected_project" 
            		data-project_id='<?php 
        echo $account['id'];
        ?>
' 
                	data-project_name='<?php 
        echo $account['name'];
        ?>
'
                    data-project_code='<?php 
        echo $account['code'];
        ?>
'
                    data-project_support_status='<?php 
        echo $account['support_status'];
        ?>
'
                    data-project_price='<?php 
        echo get_money($account['price']);
        ?>
'
                    data-project_mileage_price='<?php 
        echo get_money($account['mileage_price']);
        ?>
'
                    >
				<?php 
        lang('Choose');
        ?>
</a>
            </td>
            <td><?php 
        echo $account['name'];
        ?>
</td>
            <td><?php 
        echo $account['code'];
        ?>
</td>
            <td><?php 
        echo $accounts[$account['account_id']]['name'];
        ?>
</td>
            <td><?php 
        if ($account['support_status'] == 1) {
            ?>
                	<?php 
            lang('Support Yes');
            ?>
                <?php 
        } else {
            ?>
                	<?php 
            lang('Support No');
            ?>
                <?php 
        }
        ?>
</td>
            <td><?php 
        echo $account['response_time'];
        ?>
</td>
        </tr>
    <?php 
    }
    ?>
    	</tbody>
    </table>
    
    <script>
        $('.btnSelected_project').click(function() {
			<?php 
    if (isset($data['project_id'])) {
        ?>
$('#<?php 
        echo $data['project_id'];
        ?>
').val($(this).attr('data-project_id'));<?php 
    }
    ?>
			<?php 
    if (isset($data['project_name'])) {
        ?>
$('#<?php 
        echo $data['project_name'];
        ?>
').val($(this).attr('data-project_name'));<?php 
    }
    ?>
			<?php 
    if (isset($data['project_code'])) {
        ?>
$('#<?php 
        echo $data['account_name'];
        ?>
').val($(this).attr('data-project_code'));<?php 
    }
    ?>
			<?php 
    if (isset($data['project_support_status'])) {
        ?>
$('#<?php 
        echo $data['project_support_status'];
        ?>
').val($(this).attr('data-project_support_status'));<?php 
    }
    ?>
			<?php 
    if (isset($data['project_price'])) {
        ?>
$('#<?php 
        echo $data['project_price'];
        ?>
').val($(this).attr('data-project_price'));<?php 
    }
    ?>
			<?php 
    if (isset($data['project_mileage_price'])) {
        ?>
$('#<?php 
        echo $data['project_mileage_price'];
        ?>
').val($(this).attr('data-project_mileage_price'));<?php 
    }
    ?>
			<?php 
    if (isset($data['RUN'])) {
        echo $data['RUN'];
    }
    ?>
			$('.close').click();
		});
	</script>
    <?php 
}
Esempio n. 9
0
    } else {
        unset($postdb[password]);
    }
    $postdb[totalspace] = $postdb[totalspace] * 1024 * 1024;
    $postdb[groups] = implode(",", $postdb[groups]);
    if ($postdb[groups]) {
        $postdb[groups] = ",{$postdb['groups']},";
    }
    $array = $postdb;
    unset($array[money]);
    $array[username] = $rsdb[username];
    $array[email_yz] = $email_yz;
    $array[mob_yz] = $mob_yz;
    $array[idcard_yz] = $idcard_yz;
    $userDB->edit_user($array);
    $rsdb[money] = get_money($uid);
    add_user($uid, $postdb[money] - $rsdb[money], '管理员操作');
    //自定义用户字段
    Reg_memberdata_field($uid, $postdb);
    jump("修改成功", "index.php?lfj=member&job=editmember&uid={$uid}");
} elseif ($action == "delete" && $Apower[member_list]) {
    if (!$uid_db && $uid) {
        $uid_db[] = $uid;
    }
    foreach ($uid_db as $uid) {
        $rsdb = $userDB->get_info($uid);
        if ($rsdb[groupid] == 3 && $userdb[groupid] != 3) {
            showmsg("你无权删除超级管理员");
        }
        if ($uid == $lfjdb[uid]) {
            showmsg("你不能删除自己");
Esempio n. 10
0
    ?>
</td>
            <td class="text-right"><?php 
    echo get_money($item['total']);
    ?>
</td>
            <td class="text-right">% (<?php 
    echo $item['tax_rate'];
    ?>
)</td>
            <td class="text-right"><?php 
    echo get_money($item['tax']);
    ?>
</td>
            <td class="text-right"><?php 
    echo get_money($item['sub_total']);
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
</table> <!-- /.table -->
</div> <!-- /#invoices -->





Esempio n. 11
0
list($url, $true_name, $fen, $type) = explode("@@@", $detail[$ti]);
list($TI, $Aid) = explode("\t", mymd5($_COOKIE["down_{$rsdb['aid']}"], 'DE'));
if (!$web_admin && $lfjuid !== $rsdb[uid] && $fen > 0) {
    $fen = intval($fen);
    if ($Aid != $rsdb[aid] || $TI != $ti) {
        if (get_money($lfjuid) < $fen) {
            showerr("你的{$webdb[MoneyName]}不足{$fen}{$webdb[MoneyDW]}", 1);
        } else {
            add_user($lfjuid, -$fen, '观看视频扣分');
            //1小时内不重复扣积分
            setcookie("down_{$rsdb['aid']}", mymd5("{$ti}\t{$rsdb['aid']}"), $timestamp + 3600);
        }
    }
} elseif (!$web_admin && $lfjuid !== $rsdb[uid] && $rsdb[money] > 0) {
    if ($Aid != $rsdb[aid] || $TI != $ti) {
        if (get_money($lfjuid) < $rsdb[money]) {
            showerr("你的{$webdb[MoneyName]}不足{$rsdb[money]}{$webdb[MoneyDW]}", 1);
        } else {
            add_user($lfjuid, -$rsdb[money], '观看视频扣分');
            //1小时内不重复扣积分
            setcookie("down_{$rsdb['aid']}", mymd5("{$ti}\t{$rsdb['aid']}"), $timestamp + 3600);
        }
    }
}
//更新点击量
update_hits($mid, $midDB[keywords], $id, $rid, $rsdb[hits_time]);
$true_url = tempdir($url);
require_once html("player");
//下载与播放视频更新点击率
function update_hits($mid, $keyword, $aid, $rid, $time)
{
Esempio n. 12
0
    ?>
</td>
            <td><?php 
    echo $car['plate'];
    ?>
</td>
            <td class="hidden-xs hidden-sm"><?php 
    echo $car['now_mileage'];
    ?>
</td>
            <td class="hidden-xs hidden-sm"><?php 
    echo $car['maintenance_finish_km'];
    ?>
</td>
            <td class="text-right hidden-xs hidden-sm"><?php 
    echo get_money($car['mpg']);
    ?>
</td>
            <td class="hidden-xs hidden-sm"><?php 
    echo @$users[$car['user_id']]['name'];
    ?>
 <?php 
    echo @$users[$car['user_id']]['surname'];
    ?>
</td>
        </tr>
    <?php 
}
?>
    
    </tbody>
Esempio n. 13
0
/**
*文章检查
**/
function check_article($rsdb)
{
    global $fidDB, $web_admin, $groupdb, $timestamp, $lfjid, $lfjuid, $fid, $id, $buy, $lfjdb, $webdb, $pre, $_pre, $db;
    if ($lfjid && ($web_admin || $lfjid == $rsdb[uid] || in_array($lfjid, explode(",", $fidDB[admin])))) {
        $power = 1;
    }
    if (!$rsdb) {
        showerr("内容不存在");
    }
    if ($fidDB[allowviewcontent] && !$power && !in_array($groupdb[gid], explode(",", $fidDB[allowviewcontent]))) {
        showerr("本栏目设置,你所在用户组不允许浏览内容");
    }
    if ($rsdb[allowview] && !$power && !in_array($groupdb[gid], explode(",", $rsdb[allowview]))) {
        showerr("本文设置,你所在用户组不允许浏览内容");
    }
    //设置了开始浏览日期限制
    if ($rsdb[begintime] && $timestamp < $rsdb[begintime] && !$power) {
        $rsdb[begintime] = date("Y-m-d H:i:s", $rsdb[begintime]);
        showerr("<font color='red' ><u>很抱歉,作者设置了本文内容只有到了“{$rsdb[begintime]}”那个时间才可以查看</u></font>");
    }
    //设置了失效浏览日期限制
    if ($rsdb[endtime] && $timestamp > $rsdb[endtime] && !$power) {
        $rsdb[endtime] = date("Y-m-d H:i:s", $rsdb[endtime]);
        showerr("<font color='red' ><u>很抱歉,发布者设置了本文内容最后查看期限是“{$rsdb[endtime]}”,现在已超过了这个期限,所以不能查看</u></font>");
    }
    if ($rsdb[yz] == 2 && !$web_admin) {
        showerr("回收站的内容只有管理员才可以查看");
    }
    //未审核
    if (!$rsdb[yz] && !$webdb[viewNoPassArticle] && !$power) {
        showerr("<font color='red' ><u>很抱歉,本文还没通过验证,你不能查看</u></font>");
    }
    //跳转到外面
    if ($rsdb[jumpurl]) {
        echo "页面正在跳转中,请稍候...<META HTTP-EQUIV=REFRESH CONTENT='0;URL={$rsdb['jumpurl']}'>";
        exit;
    }
    //文章密码
    if ($rsdb[passwd]) {
        if ($_POST[password] && $_POST[TYPE] == 'article') {
            if ($_POST[password] != $rsdb[passwd]) {
                echo "<A HREF=\"?fid={$fid}&id={$id}\">密码不正确,点击返回</A>";
                exit;
            } else {
                setcookie("article_passwd_{$_pre}{$id}", $rsdb[passwd]);
                $_COOKIE["article_passwd_{$_pre}{$id}"] = $rsdb[passwd];
            }
        }
        if ($_COOKIE["article_passwd_{$_pre}{$id}"] != $rsdb[passwd]) {
            echo "<CENTER><form name=\"form1\" method=\"post\" action=\"\">请输入文章密码:<input type=\"password\" name=\"password\"><input type=\"hidden\" name=\"TYPE\" value=\"article\"><input type=\"submit\" name=\"Submit\" value=\"提交\"></form></CENTER>";
            exit;
        }
    }
    //栏目密码
    if ($fidDB[passwd]) {
        if ($_POST[password] && $_POST[TYPE] == 'sort') {
            if ($_POST[password] != $fidDB[passwd]) {
                echo "<A HREF=\"?fid={$fid}&aid={$aid}\">密码不正确,点击返回</A>";
                exit;
            } else {
                setcookie("sort_passwd_{$_pre}{$fid}", $fidDB[passwd]);
                $_COOKIE["sort_passwd_{$_pre}{$fid}"] = $fidDB[passwd];
            }
        }
        if ($_COOKIE["sort_passwd_{$_pre}{$fid}"] != $fidDB[passwd]) {
            echo "<CENTER><form name=\"form1\" method=\"post\" action=\"\">请输入栏目密码:<input type=\"password\" name=\"password\"><input type=\"hidden\" name=\"TYPE\" value=\"sort\"><input type=\"submit\" name=\"Submit\" value=\"提交\"></form></CENTER>";
            exit;
        }
    }
    //积分处理
    if (!$power && ($rsdb[money] = abs($rsdb[money]))) {
        if (!$lfjuid) {
            showerr("请先登录,需要支付{$rsdb[money]}{$webdb[MoneyName]}才能查看");
        } elseif (!strstr($rsdb[buyuser], ",{$lfjid},")) {
            $lfjdb[money] = get_money($lfjuid);
            if ($lfjdb[money] < $rsdb[money]) {
                showerr("你的{$webdb[MoneyName]}不足{$rsdb['money']}");
            } elseif ($buy == 1) {
                add_user($lfjuid, "-{$rsdb['money']}");
                add_user($rsdb[uid], "{$rsdb['money']}");
                $rsdb[buyuser] = $rsdb[buyuser] ? ",{$lfjid}{$rsdb[buyuser]}" : ",{$lfjid},";
                $db->query("UPDATE {$_pre}content SET buyuser='******'buyuser']}' WHERE id={$id}");
                refreshto("?fid={$fid}&id={$id}", "购买成功,你刚刚消耗了{$webdb[MoneyName]}{$rsdb[money]}{$webdb[MoneyDW]}", 3);
            } else {
                showerr("你需要消耗{$webdb[MoneyName]}{$rsdb[money]}{$webdb[MoneyDW]}才有权限查看,是否继续<br><br>[<A HREF='?fid={$fid}&id={$id}&buy=1'>我要继续</A>]");
            }
        }
    }
}
Esempio n. 14
0
    $lfjdb[sex] = '保密';
}
$group_db = $db->get_one("SELECT totalspace,grouptitle FROM {$pre}group WHERE gid='{$lfjdb['groupid']}' ");
//用户已使用空间
$lfjdb[usespace] = number_format($lfjdb[usespace] / (1024 * 1024), 3);
//系统允许使用空间
$space_system = number_format($webdb[totalSpace], 0);
//用户组允许使用空间
$space_group = number_format($group_db[totalspace], 0);
//用户本身具有的空间
$space_user = number_format($lfjdb[totalspace] / (1024 * 1024), 0);
//用户余下可用空间大小
$onlySpace = number_format($webdb[totalSpace] + $group_db[totalspace] + $lfjdb[totalspace] / (1024 * 1024) - $lfjdb[usespace], 3);
$lfjdb[lastvist] = date("Y-m-d H:i:s", $lfjdb[lastvist]);
$lfjdb[regdate] = date("Y-m-d H:i:s", $lfjdb[regdate]);
$lfjdb[money] = get_money($lfjdb[uid]);
if ($lfjdb[C][endtime] && $lfjdb[groupid] != 8) {
    $lfjdb[C][endtime] = date("Y-m-d", $lfjdb[C][endtime]);
    $lfjdb[C][endtime] = "于{$lfjdb[C][endtime]}截止";
} else {
    $lfjdb[C][endtime] = '长期有效';
}
if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
    @extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM {$TB_pre}msg WHERE `touid`='{$lfjuid}' AND type='rebox' AND ifnew=1"));
} elseif (ereg("^dzbbs", $webdb[passport_type])) {
    if ($webdb[passport_type] == 'dzbbs7') {
        $pmNUM = uc_pm_checknew($lfjuid);
    } else {
        @extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM {$TB_pre}pms WHERE `msgtoid`='{$lfjuid}' AND folder='inbox' AND new=1"));
    }
} else {
Esempio n. 15
0
 function render_money($somme = null)
 {
     if (is_null($somme)) {
         $somme = user_data('Account_Golds');
     }
     $prix = get_money($somme);
     $cout = "<br/>";
     foreach ($prix as $x => $am) {
         $cout .= $am . '<div class="gain gold' . $x . '">' . LanguageValidation::iMsg("label.gold" . $x . ".card") . '</div>';
     }
     $cout .= "<br/>";
     return $cout;
 }
Esempio n. 16
0
require "global.php";
@(include_once ROOT_PATH . "data/all_area.php");
if (!$uid && !$username) {
    $uid = $lfjuid;
}
$uid = intval($uid);
if ($uid) {
    $rsdb = $userDB->get_info($uid);
} elseif ($username) {
    $rsdb = $userDB->get_info($username, 'name');
}
if (!$rsdb) {
    showerr("用户不存在");
}
$db->query("UPDATE {$pre}memberdata SET hits=hits+1,lastview='{$timestamp}' WHERE uid='{$uid}'");
$rsdb[money] = get_money($rsdb[uid]);
$group_db = $db->get_one("SELECT totalspace,grouptitle FROM {$pre}group WHERE gid='{$rsdb['groupid']}' ");
//已使用空间
$rsdb[usespace] = number_format($rsdb[usespace] / (1024 * 1024), 3);
//系统允许使用空间
$space_system = number_format($webdb[totalSpace], 3);
//用户组允许使用空间
$space_group = number_format($group_db[totalspace], 3);
//用户本身具有的空间
$space_user = number_format($rsdb[totalspace] / (1024 * 1024), 3);
//用户余下空间
$rsdb[totalspace] = number_format($webdb[totalSpace] + $group_db[totalspace] + $rsdb[totalspace] / (1024 * 1024) - $rsdb[usespace], 3);
if ($rsdb[sex] == 1) {
    $rsdb[sex] = '男';
} elseif ($rsdb[sex] == 2) {
    $rsdb[sex] = '女';
Esempio n. 17
0
</td>
            <td><?php 
    echo $invoice['type'];
    ?>
</td>
            <td><?php 
    echo get_text_in_out($invoice['in_out']);
    ?>
</td>
            <td><a href="<?php 
    echo site_url('account/get_account/' . $invoice['account_id']);
    ?>
" target="_blank"><?php 
    echo $accounts[$invoice['account_id']]['name'];
    ?>
</a></td>
            <td><?php 
    echo $invoice['val_1'];
    ?>
</td>
            <td class="text-right"><?php 
    echo get_money($invoice['grand_total']);
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
</table> <!-- /.table -->
Esempio n. 18
0
<?php

if (!function_exists('html')) {
    die('F');
}
if (!$lfjuid) {
    showerr('请先登录');
}
$_erp = $Fid_db[tableid][$fid];
$rs = $db->get_one("SELECT * FROM {$_pre}content{$_erp} WHERE id='{$id}'");
if ($rs[uid] != $lfjuid && !$web_admin) {
    showerr('你没权限');
}
$list = $timestamp + 3600 * 24 * $webdb[Info_TopDay];
if (!$web_admin) {
    $lfjdb[money] = intval(get_money($lfjuid));
    if ($lfjdb[money] < $webdb[Info_TopMoney]) {
        showerr("你的积分不足:{$webdb['Info_TopMoney']},不能选择置顶");
    }
    add_user($lfjuid, -intval($webdb[Info_TopMoney]), '置顶扣分');
}
$db->query("UPDATE {$_pre}content{$_erp} SET list='{$list}' WHERE id='{$id}'");
refreshto("{$FROMURL}", "置顶成功", 1);
Esempio n. 19
0
<?php

require dirname(__FILE__) . "/" . "global.php";
$lfjdb && ($lfjdb[money] = get_money($lfjdb[uid]));
$query = $db->query("SELECT * FROM {$pre}jfsort ORDER BY list");
while ($rs = $db->fetch_array($query)) {
    $fnameDB[$rs[fid]] = $rs[name];
    $query2 = $db->query("SELECT * FROM {$pre}jfabout WHERE fid='{$rs['fid']}' ORDER BY list");
    while ($rs2 = $db->fetch_array($query2)) {
        eval("\$rs2[title]=\"{$rs2['title']}\";");
        eval("\$rs2[content]=\"{$rs2['content']}\";");
        $jfDB[$rs[fid]][] = $rs2;
    }
}
require ROOT_PATH . "inc/head.php";
require html("jf");
require ROOT_PATH . "inc/foot.php";