예제 #1
0
파일: home_text.php 프로젝트: haogm123/ydoa
<?php 
$query = $db->query("SELECT sendperson,date,content,id FROM " . DB_TABLEPRE . "sms_receive  where smskey='1' and receiveperson='" . $_USER->id . "' order by date desc");
while ($row = $db->fetch_array($query)) {
    ?>
<div class="content clearfix">
<p class="content_txt">
<em><?php 
    echo get_realname($row['sendperson']);
    ?>
</em>:
<?php 
    //过滤下载
    $content = str_replace("data/uploadfile/", "down.php?urls=data/uploadfile/", $row['content']);
    $content = str_replace('target="_blank"', "", $content);
    $content = str_replace('<a', "&nbsp;&nbsp;<a", $content);
    $content = str_replace('admin.php?', "admin.php?ac=receive&fileurl=sms&do=smskeymana&id=" . $row['id'] . "&urls=" . str_replace('&', "-", get_subcontent($content, 'admin.php?ac=', '>')), $content);
    echo $content;
    ?>
</p>
<p class="content_action WB_linkB">
<span class="content_actionTime">
<?php 
    echo trim($row['date']);
    ?>
</span>
<!--<span class="content_actionMore">
标志己读
</span>
 --></p>
</div>
<?php 
예제 #2
0
function dep_data_user($fid = 0, $userview)
{
    global $db;
    global $_USER;
    //re
    //	if(get_postname(get_pos($_USER->id))=='局领导'){
    //	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."user a,".DB_TABLEPRE."user_view b WHERE (a.positionid<11) and a.id=b.uid and a.departmentid = '$fid' order by a.numbers asc");}
    //	if(get_postname(get_pos($_USER->id))=='处级'){
    //	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."user a,".DB_TABLEPRE."user_view b WHERE (a.positionid=2 or a.positionid=1 or a.positionid=5) and a.id=b.uid and a.departmentid = '$fid' order by a.numbers asc");}
    //	if(get_postname(get_pos($_USER->id))=='副处级'){
    //	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."user a,".DB_TABLEPRE."user_view b WHERE (a.positionid>0) and a.id=b.uid and a.departmentid = '$fid' order by a.numbers asc");}
    //	if(get_postname(get_pos($_USER->id))=='调研员' or get_postname(get_pos($_USER->id))=='副调研员'){
    //	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."user a,".DB_TABLEPRE."user_view b WHERE (a.positionid>0) and a.id=b.uid and a.departmentid = '$fid' order by a.numbers asc");}
    //	if(get_postname(get_pos($_USER->id))=='科员' or get_postname(get_pos($_USER->id))=='科级' or get_postname(get_pos($_USER->id))=='副科级' or get_postname(get_pos($_USER->id))==''){
    //	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."user a,".DB_TABLEPRE."user_view b WHERE (a.positionid<>1) and a.id=b.uid and a.departmentid = '$fid' order by a.numbers asc");}
    //re
    $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "user a," . DB_TABLEPRE . "user_view b WHERE a.id=b.uid and a.departmentid = '{$fid}' order by a.numbers asc");
    $html = '';
    while ($row = $db->fetch_array($query)) {
        $html .= 'subarr' . $fid . '.push( {' . chr(13) . chr(10);
        $html .= ' "id" : "2' . $row['id'] . '",' . chr(13) . chr(10);
        $html .= '  "text" : "' . $row['name'] . '",' . chr(13) . chr(10);
        $html .= '  "value" : "' . $row['id'] . '",' . chr(13) . chr(10);
        $html .= '  "showcheck" : true,' . chr(13) . chr(10);
        $html .= '  complete : true,' . chr(13) . chr(10);
        $html .= '  "isexpand" : false,' . chr(13) . chr(10);
        if (get_subcontent($userview, $row['name'], '515158.com') != '') {
            $html .= '  "checkstate" : 1,' . chr(13) . chr(10);
        } else {
            $html .= '  "checkstate" : 0,' . chr(13) . chr(10);
        }
        $html .= '  "hasChildren" : false' . chr(13) . chr(10);
        $html .= '  });' . chr(13) . chr(10);
    }
    echo $html;
}