<th class="sortableCol">姓名</th>
				<th class="sortableCol" valuetype="number">学号</th>
				<th class="sortableCol">导师</th>
				<th class="sortableCol">性别</th>
				<th class="sortableCol">年级</th>				
				<th class="sortableCol">专业</th>
				<th class="sortableCol">培养类型</th>
				<th class="sortableCol">家庭住址</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<?php 
for ($i = 1; $i <= $pagesize; $i++) {
    $row = _fetch_array_list($res);
    $address = _cut($row['gm_address'], 15);
    if (!$row['gm_teacher']) {
        $row['gm_teacher'] = '<a href="teacher_match.php?action=one&num=' . $row['gm_num'] . '">分配</a>';
    }
    if ($row['gm_num'] == '') {
        break;
    }
    echo "<tr><td>{$i}</td><td>{$row['gm_username']}</td><td>{$row['gm_num']}</td><td>{$row['gm_teacher']}</td><td>{$row['gm_sex']}</td><td>{$row['gm_grade']}</td><td>{$row['gm_subject']}</td><td>{$row['gm_type']}</td><td title='{$row['gm_address']}'>{$address}</td><td><a href='stu_date_one.php?num={$row['gm_num']}'>详细</a> <a href='stu_data_edit.php?num={$row['gm_num']}'>修改</a>";
    if ($_SESSION['level'] == 3) {
        echo " <a href='###' onclick=_confirm('确定删除该同学资料吗?','stu_date.php?action=del&num={$row['gm_num']}')>删除</a>";
    }
    echo "</td></tr>";
}
?>
		</tbody>
	</table>
<?php 
require ROOT_PATH . 'includes/header_admin.inc.php';
?>
<div id="main">
	<div id="list">
	<?php 
if ($_GET['action'] == '') {
    if ($num != 0) {
        echo '<ul>';
        echo '<li class="top">公告中心</li>';
        for ($i = 0; $i < $pagesize; $i++) {
            $row = _fetch_array_list($res);
            if ($row['gm_id'] == '') {
                break;
            }
            $row['gm_title'] = _cut($row['gm_title'], 46);
            echo '<li class="time">' . $row['gm_time'] . '</li>';
            echo "<li class='title'><a href='notice_edit_admin.php?action=edit&id={$row['gm_id']}'>{$row['gm_title']}</a> <span><a href='###' onclick=\"_confirm('确定删除这条公告吗?','notice_admin.php?action=del&id={$row['gm_id']}')\">[删除]</a> <a href='notice_edit_admin.php?action=edit&id={$row['gm_id']}'>[修改]</a></span></li>";
            echo '<li class="line"></li>';
        }
        echo '</ul>';
    } else {
        echo "<center>暂时还没有任何公告</center>";
    }
    //引入分页
    _paging($_system['notice_page']);
}
?>
	</div>
</div>
<?php 
Example #3
0
		<dd><a href="teacher_data.php">共有<?php 
echo $teacher_num;
?>
个导师信息</a></dd>	
	</dl>
</div>
<div id="right">
	<dl>
		<dt> 最新留言</dt>
		<?php 
for ($i = 0; $i < 8; $i++) {
    $message_row = _fetch_array_list($message_res);
    if ($message_row['gm_id'] == '') {
        break;
    }
    echo '<dd><span class="stu"><a href="stu_date_one.php?num=' . $message_row['gm_num'] . '">' . $message_row['gm_username'] . '</a></span><span class="time">于' . date('Y-m-d H:i', strtotime($message_row['gm_systime'])) . ' </span><a href="message_edit_admin.php?action=edit&id=' . $message_row['gm_id'] . '">' . _cut($message_row['gm_content'], 25) . '</a>';
    if ($message_row['gm_replytime'] == NULL) {
        echo ' [<i>未回复</i>]';
    }
    echo '</dd>';
}
?>

	</dl>
</div>    
</div>
<?php 
require ROOT_PATH . 'includes/footer_admin.inc.php';
?>

</body>
				<th class="sortableCol" >专业</th>
				<th class="sortableCol" >管理类型</th>
				<th class="sortableCol">申请时间</th>
				<th class="sortableCol">金额</th>
				<th class="sortableCol" >事由</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<?php 
    for ($i = 1; $i <= $pagesize; $i++) {
        $rows = _fetch_array_list($res);
        if ($rows['gm_num'] == '') {
            break;
        }
        $gm_details = _cut($rows['gm_details'], 10);
        $rows['gm_ftype'] = _check_funds_type($rows['gm_ftype']);
        $rows['gm_money'] = _check_money($rows['gm_money']);
        echo "<tr><td>{$i}</td><td><a href='stu_date_one.php?num={$rows['gm_num']}' class='a'>{$rows['gm_username']}</a></td><td>{$rows['gm_num']}</td><td>{$rows['gm_sex']}</td><td>{$rows['gm_grade']}</td><td>{$rows['gm_subject']}</td><td>{$rows['gm_type']}</td><td>{$rows['gm_time']}</td><td><b>{$rows['gm_money']}</b></td><td title='{$rows['gm_details']}'>{$gm_details}</td><td><a href='###' onclick=_confirm('确定通过该条申请吗?','funds_active.php?action=pass&id={$rows['gm_fid']}')>通过 </a> <a href='###' onclick=_confirm('确定删除该条申请吗?','funds_active.php?action=del&id={$rows['gm_fid']}')>删除</a></td></tr>";
    }
    ?>
		</tbody>
	</table>
<?php 
    //引入分页
    if ($_GET['action'] == '') {
        _paging($_system['funds_admin_page']);
    }
    echo "<p class='record'>共有<span>{$num}</span>条信息需要审核</p>";
}
?>
    $notice_row = _fetch_array_list($notice_res);
    if ($notice_row['gm_id'] == '') {
        break;
    }
    echo '<dd><a href="notice_s.php?action=one&id=' . $notice_row['gm_id'] . '">' . _cut($notice_row['gm_title'], 20) . '</a></dd>';
}
?>
	</dl>
</div>
<div id="right">
	<dl>
		<dt> 最新留言</dt>
		<?php 
for ($i = 0; $i < 12; $i++) {
    $message_row = _fetch_array_list($message_res);
    if ($message_row['gm_id'] == '') {
        break;
    }
    echo '<dd><span class="stu">' . $message_row['gm_username'] . '</span><span class="time">于' . date('Y-m-d H:i', strtotime($message_row['gm_systime'])) . ' </span>' . _cut($message_row['gm_content'], 30) . '</dd>';
}
?>

	</dl>
</div>    
</div>
<?php 
require ROOT_PATH . 'includes/footer_admin.inc.php';
?>

</body>
</html>
Example #6
0
function Getshop()
{
    $urlstr = $_POST['url'];
    $shopdata = array();
    if ($urlstr) {
        preg_match_all('~(?:https?\\:\\/\\/)(?:[A-Za-z0-9_\\-]+\\.)+[A-Za-z0-9]{2,4}(?:\\/[\\w\\d\\/=\\?%\\-\\&_\\~`@\\[\\]\\:\\+\\#]*(?:[^<>\'\\"\\n\\r\\t\\s])*)?~', $urlstr, $match);
        if ($match[0]) {
            if (false !== strpos($match[0][0], "taobao.com")) {
                if (false !== strpos($match[0][0], "item.taobao.com/item.htm")) {
                    $tbcontent = file_get_contents($match[0][0], 'r');
                    $tbcontent = array_iconv('gbk', $GLOBALS['_J']['config']['charset'], $tbcontent);
                    $shopdata['goods'] = _cut($tbcontent, '<title>', '</title>');
                    $shopdata['price'] = _cut($tbcontent, '<strong id="J_StrPrice" >', '</strong>');
                    if (empty($shopdata['price'])) {
                        $shopdata['price'] = _cut($tbcontent, '<strong class="tb-price" id="J_SpanLimitProm">', '</strong>');
                    } elseif (false !== strpos($shopdata['price'], "tb-rmb-num")) {
                        $shopdata['price'] = _cut($shopdata['price'], '<em class="tb-rmb-num">', '</em>');
                    }
                    $p = array('pic_url' => $url);
                    $tbimage = _cut($tbcontent, '<img id="J_ImgBooth" src="', '"  data-hasZoom="700"');
                    if (empty($tbimage)) {
                        $tbimage = _cut($tbcontent, '<img id="J_ImgBooth" data-src="', '"  data-hasZoom="700"');
                    }
                    $rets = jlogic('image')->upload(array('pic_url' => $tbimage));
                    if ($rets['code'] < 0 && $rets['error']) {
                        $shopdata['imageid'] = 0;
                        $shopdata['image'] = $shopdata['imaged'] = $tbimage;
                    } else {
                        $shopdata['imageid'] = $rets['id'];
                        $shopdata['image'] = $rets['src'];
                        $shopdata['imaged'] = str_replace('_s.jpg', '_o.jpg', $shopdata['image']);
                    }
                    preg_match_all("/id=[0-9]+/", $match[0][0], $matchid);
                    $shopdata['url'] = 'http:/' . '/item.taobao.com/item.htm?' . $matchid[0][0];
                    $tbseller = _cut($tbcontent, '<a class="hCard fn" ', '<span class="J_WangWang" data-nick=');
                    $shopdata['surl'] = _cut($tbseller, ' href="', '">');
                    $shopdata['seller'] = '〖淘宝网〗' . _cut($tbseller, 'title="', '" href=');
                    unset($tbcontent, $tbimage, $tbseller, $rets);
                } else {
                    echo '0|||<font color="red">地址错误,不是有效的商品地址!</font>';
                    exit;
                }
            } elseif (false !== strpos($match[0][0], "tmall.com")) {
                if (false !== strpos($match[0][0], "detail.tmall.com/item.htm") || false !== strpos($match[0][0], "item.tmall.com/item.htm")) {
                    $tmcontent = file_get_contents($match[0][0], 'r');
                    $tmcontent = array_iconv('gbk', $GLOBALS['_J']['config']['charset'], $tmcontent);
                    $shopdata['goods'] = _cut($tmcontent, '<title>', '</title>');
                    $shopdata['price'] = _cut($tmcontent, "'defaultItemPrice':'", "',");
                    $p = array('pic_url' => $url);
                    $tmimage = _cut($tmcontent, '<span id="J_ImgBooth" src="', '"></span>');
                    if (!$tmimage) {
                        $tmimage = _cut($tmcontent, '<span id="J_ZoomHook" src="', '"></span>');
                    }
                    $rets = jlogic('image')->upload(array('pic_url' => $tmimage));
                    if ($rets['code'] < 0 && $rets['error']) {
                        $shopdata['imageid'] = 0;
                        $shopdata['image'] = $shopdata['imaged'] = $tmimage;
                    } else {
                        $shopdata['imageid'] = $rets['id'];
                        $shopdata['image'] = $rets['src'];
                        $shopdata['imaged'] = str_replace('_s.jpg', '_o.jpg', $shopdata['image']);
                    }
                    preg_match_all("/id=[0-9]+/", $match[0][0], $matchid);
                    $shopdata['url'] = 'http:/' . '/detail.tmall.com/item.htm?' . $matchid[0][0];
                    $tmseller = _cut($tmcontent, '<div id="J_shopSearchData" ', '</div>');
                    $shopdata['surl'] = _cut($tmseller, "data-shopUrl='", "' data-shopName");
                    $shopdata['seller'] = '〖天猫〗' . _cut($tmseller, "data-shopName='", "'>");
                    unset($tmcontent, $tmimage, $tmseller, $rets);
                } else {
                    echo '0|||<font color="red">地址错误,不是有效的商品地址!</font>';
                    exit;
                }
            } else {
                echo '0|||<font color="red">系统目前只支持淘宝与天猫,请重新输入!</font>';
                exit;
            }
            $data = array('tid' => 0, 'uid' => MEMBER_ID, 'username' => MEMBER_NICKNAME, 'goods' => $shopdata['goods'], 'seller' => $shopdata['seller'], 'imageid' => $shopdata['imageid'], 'image' => $shopdata['imaged'], 'url' => $shopdata['url'], 'surl' => $shopdata['surl'], 'price' => $shopdata['price'], 'dateline' => time());
            $shopid = DB::insert('topic_shop', $data, true);
            $str = '<table><tr><td colspan="2"><b>' . $data['goods'] . '</b></td></tr><tr><td rowspan="3" width="140" height="140"><img src="' . $shopdata['image'] . '" width="120" height="120"></td><td width="160"><b>价格</b>:¥' . $data['price'] . '元</td></tr><tr><td><b>卖家</b>:' . $data['seller'] . '</td></tr><tr><td align="center"><input type="button" name="del" value="删 除" class="u-btn" onclick="del_shop(' . $shopid . ');"/></td></tr></table>';
            echo $shopid . '|||' . $str;
        } else {
            echo '0|||<font color="red">商品地址输入错误,请重新输入!</font>';
        }
    }
}