当前位置: 首页>>代码示例>>PHP>>正文


PHP cutStr函数代码示例

本文整理汇总了PHP中cutStr函数的典型用法代码示例。如果您正苦于以下问题:PHP cutStr函数的具体用法?PHP cutStr怎么用?PHP cutStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cutStr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getArticles

 function getArticles($channelid, $type, $order, $n, $b, $w = 100, $returnarr = 0)
 {
     $channelid = intval($channelid);
     $type = intval($type);
     $order = intval($order);
     $n = intval($n);
     $b = intval($b);
     $w = intval($w);
     global $cache_channels;
     $channel = $cache_channels[$channelid];
     $articlestr = "";
     $orderstr = $order == 1 ? "hits desc" : "posttime desc";
     $arts = $this->db->row_select("articles", "langid={$this->langid}" . ($channelid > 0 ? " and channelid={$channelid}" : "") . ($type > 0 ? " and type={$type}" : "") . "", $n, "id,channelid,posttime,title,content,type,picid,picpath", $orderstr);
     if ($returnarr == 1) {
         return $arts;
     }
     $bn = 0;
     foreach ($arts as $art) {
         $arturl = $this->genUrl("view.php?id={$art['id']}");
         $art['posttime'] = getDateStr($art['posttime'], true);
         $bn++;
         if ($bn < $b + 1) {
             $art['picpath'] = $this->getPicPath($art['picpath']);
             $articlestr .= "<li class=\"pictitle\"><a href=\"{$arturl}\" target=\"_blank\">{$art['title']}</a><p><a href=\"{$arturl}\" target=\"_blank\"><img src=\"{$art['picpath']}\" /></a><a href=\"{$arturl}\" target=\"_blank\">" . cutStr(strip_tags($art['content']), $w) . "</a></p></li>";
         } else {
             $articlestr .= "<li class=\"normaltitle\"><span class=time>{$art['posttime']}</span><a href=\"{$arturl}\" target=\"_blank\">{$art['title']}</a></li>";
         }
     }
     return $articlestr;
 }
开发者ID:rust1989,项目名称:edit,代码行数:30,代码来源:webcore_class.php

示例2: addNews

 public function addNews()
 {
     $M = M("News");
     $data = $_POST['info'];
     $data['published'] = time();
     $data['aid'] = $_SESSION['my_info']['aid'];
     if (empty($data['summary'])) {
         $data['summary'] = cutStr($data['content'], 200);
     }
     if ($M->add($data)) {
         return array('status' => 1, 'info' => "已经发布", 'url' => U('News/index'));
     } else {
         return array('status' => 0, 'info' => "发布失败,请刷新页面尝试操作");
     }
 }
开发者ID:slyfalcon,项目名称:PHP-Amateur_Common_System,代码行数:15,代码来源:NewsModel.class.php

示例3: run

 public function run()
 {
     global $_FANWE;
     $root = array();
     $root['return'] = 0;
     if ($_FANWE['uid'] == 0) {
         $root['info'] = "请先登陆";
         m_display($root);
     }
     $user_name = trim($_FANWE['requestData']['user_name']);
     if (empty($user_name)) {
         $root['info'] = "请选择要发送信件的粉丝";
         m_display($root);
     }
     $message = trim($_FANWE['requestData']['message']);
     if (empty($message)) {
         $root['info'] = "请输入要发送信息";
         m_display($root);
     }
     //echo $user_name; exit;
     $user = FS('User')->getUsersByName($user_name);
     if (empty($user)) {
         $root['info'] = "请选择要发送信件的粉丝";
         m_display($root);
     }
     if (!FS('User')->getIsFollowUId2($user['uid'], $_FANWE['uid'])) {
         $root['info'] = "只能给粉丝发送信件";
         m_display($root);
     }
     $message = cutStr($message, 200);
     if (FS('Message')->sendMsg($_FANWE['uid'], $_FANWE['user_name'], array($user['uid']), '', $message) > 0) {
         $root['return'] = 1;
         $root['info'] = "发送信件成功";
     } else {
         $root['info'] = "发送信件失败";
     }
     m_display($root);
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:38,代码来源:sendmsg.mapi.php

示例4: intval

<?php

$mlid = intval($_FANWE['request']['lid']);
$message = trim($_FANWE['request']['message']);
if (empty($mlid) || empty($message)) {
    exit;
}
$message = cutStr($message, 200);
$result['status'] = FS('Message')->replyMsg($mlid, $_FANWE['uid'], $_FANWE['user_name'], $message);
if ($result['status'] > 0) {
    $result['time'] = getBeforeTimelag(TIME_UTC);
    express($message);
    $result['message'] = nl2br($message);
}
outputJson($result);
开发者ID:dalinhuang,项目名称:concourse,代码行数:15,代码来源:replymsg.php

示例5: getCustomerRoleByCustID

$addquery = getCustomerRoleByCustID($addquery, "b.customerid");
$query = $query . $addquery;
//echo $query;exit;
$rs = $db->CacheExecute(150, $query);
$ROW = $rs->GetArray();
$count = $valueVVVVVVV['显示行数'] - count($ROW);
for ($i = 0; $i < count($ROW); $i++) {
    $linkmanid = $ROW[$i]['linkmanid'];
    $linkmanname = $ROW[$i]['linkmanname'];
    $mem_type = $ROW[$i]['mem_type'];
    $customerName = returntablefield("customer", "rowid", $ROW[$i]['customerid'], "supplyname");
    $BIRTHDAY = $ROW[$i]['mem_date'];
    //echo $BIRTHDAY;
    if (cutStr($customerName, 12) != $customerName) {
        $title = $customerName;
        $customerName = cutStr($customerName, 12) . "..";
    }
    ++$COUNT2;
    $PERSON_STR2 .= "<tr class=TableBlock>\n\t\t\t\t\t\t\t\t<td><img src=\"../images/arrow_r.gif\" align=\"absmiddle\"><a href=../../JXC/customer_newai.php?action=view_default&ROWID=" . $ROW[$i]['customerid'] . " target=_blank title='{$title}'>" . $customerName . "</td>\n\t\t\t\t\t\t\t\t<td><a href=../../JXC/linkman_newai.php?action=view_default&ROWID=" . $ROW[$i]['linkmanid'] . " target=_blank>" . $linkmanname . "</td>\n\t\t\t\t\t\t\t\t<td>" . $mem_type . "(" . date("m-d", strtotime($BIRTHDAY)) . ")</td>\n\t\t\t\t\t\t\t\t<td valign=Middle align=left><a href='../../JXC/sms_sendlist_newai.php?action=add_default&sendlist=" . $ROW[$i]['linkmanid'] . "' target='_blank'><img src='../../../Framework/images/menu/010401.gif' align=absmiddle></a></td></tr>";
}
for ($i = 0; $i < $count; $i++) {
    $PERSON_STR2 .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\">&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
}
$MODULE_BODY .= "<table border=\"0\"  width=\"100%\"  height=\"100%\">";
if (0 < $COUNT2) {
    $MODULE_BODY .= $PERSON_STR2;
} else {
    $MODULE_BODY .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\"><font color=\"red\">\n\t\t\t\t\t&nbsp;暂无纪念日提醒!</font></td>";
    for ($i = 0; $i < $count - 1; $i++) {
        $MODULE_BODY .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\">&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    }
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:crm_kehu_birthday.php

示例6: cutStr

    $rs_a = $rs->GetArray();
    if (count($rs_a) != 0) {
        for ($i = 0; $i < count($rs_a); $i++) {
            $billnode = $doc->createElement("workplanmaindetail");
            $billnode = $root->appendChild($billnode);
            $begintime = $doc->createElement("begintime");
            $begintimenode = $billnode->appendChild($begintime);
            $endtime = $doc->createElement("endtime");
            $endtimenode = $billnode->appendChild($endtime);
            $content = $doc->createElement("content");
            $contentnode = $billnode->appendChild($content);
            $result = $doc->createElement("result");
            $resultnode = $billnode->appendChild($result);
            $begintimenode->appendChild($doc->createTextNode(substr($rs_a[$i]['begintime'], 0, 16)));
            $endtimenode->appendChild($doc->createTextNode(substr($rs_a[$i]['endtime'], 0, 16)));
            $contentnode->appendChild($doc->createTextNode(iconv("GBK", "UTF-8", cutStr($rs_a[$i]['content'], 10))));
            $resultnode->appendChild($doc->createTextNode($rs_a[$i]['result']));
        }
    }
    echo $doc->saveXML();
    exit;
}
if ($_GET['action'] == "add_default_data") {
    require_once "../Framework/uploadFile.php";
    uploadFile();
    $nextcontent = $_POST["nextcontent"];
    $nexttime = $_POST["nexttime"];
    $zhuti = $_POST['mainrowid_ID'];
    $db->StartTrans();
    $maxid = returnAutoIncrement("id", "workplanmain_detail");
    $sql = "insert into workplanmain_detail values({$maxid}," . $_POST['mainrowid'] . ",'" . $_SESSION['LOGIN_USER_ID'] . "','" . date("Y-m-d H:i:s") . "','" . $_POST['begintime'] . "','" . $_POST['endtime'] . "','" . htmlspecialchars($_POST['content']) . "','" . $_POST['result'] . "',";
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:workplanmain_detail_newai.php

示例7: show


//.........这里部分代码省略.........
            $album_list[] = $data;
        }
        $page_num = intval($_FANWE['setting']['share_self_page']) ? intval($_FANWE['setting']['share_self_page']) : 30;
        $is_root = false;
        $img_width = 190;
        $limit = $page_num;
        $share_ids = array();
        $res = FDB::query('SELECT share_id FROM ' . FDB::table('album_share') . ' 
				WHERE album_id = ' . $id . ' ORDER BY share_id DESC ');
        while ($data = FDB::fetch($res)) {
            $share_ids[] = $data['share_id'];
        }
        $share_ids = implode(',', $share_ids);
        if ($share_ids) {
            $sql = 'SELECT *
			FROM ' . FDB::table("share") . '
			WHERE share_data <> ' . " 'default' and share_id IN (" . $share_ids . ") \r\n\t\t\tORDER BY share_id DESC LIMIT " . $limit;
            $share_list = FDB::fetchAll($sql);
        }
        if ($share_list) {
            $share_list = FS('Share')->getShareDetailList($share_list, false, false, false, true, 2);
            $list = array();
            $current_user = array();
            $current_user['u_url'] = FU('u/index', array('uid' => $_FANWE['uid']));
            $current_user['avt'] = avatar($_FANWE['uid'], 's', $is_src = 1);
            $i = 0;
            foreach ($share_list as $k => $v) {
                $list[$i] = $v;
                $img_info = FDB::fetchFirst("select img,img_width,img_height,is_animate,video from " . FDB::table("share_photo") . " where share_id = " . $v['share_id'] . " and img <> '' ");
                if ($img_info['is_animate']) {
                    $img = $img_info['img'];
                } else {
                    $img = getImgName($img_info['img'], $img_width, 999);
                }
                $is_video = 0;
                $vedio_url = '';
                if (!empty($img_info['video'])) {
                    $is_video = 1;
                    $vedio_url = $img_info['video'];
                }
                $list[$i]['is_video'] = $is_video;
                $list[$i]['video'] = $vedio_url;
                $list[$i]['share_img'] = $img;
                $list[$i]['avt'] = avatar($v['uid'], 's', $is_src = 1);
                $list[$i]['height'] = $img_info['img_height'] * ($img_width / $img_info['img_width']);
                /*获取play图标的位置*/
                $list[$i]['video_style_top'] = ($list[$i]['height'] - 33) / 2;
                $list[$i]['video_style_right'] = (254 - 33) / 2;
                $list[$i]['width'] = $img_width;
                $list[$i]['share_img_org'] = $img_info['img'];
                $parent_id = FDB::resultFirst("select parent_id from " . FDB::table("share") . " where share_id = " . $v['share_id']);
                if ($parent_id == 0) {
                    $list[$i]['isOriginal'] = 1;
                } else {
                    $list[$i]['isOriginal'] = 0;
                }
                $list[$i]['likeStatus'] = FS('Share')->getIsCollectByUid($v['share_id'], $_FANWE['uid']) ? 1 : 0;
                $list[$i]['isMe'] = $v['uid'] == $_FANWE['uid'] ? 1 : 0;
                //分享评论
                $share_comments = FS('Share')->getShareCommentList($v['share_id'], '0,2');
                if ($share_comments) {
                    $share_comments_data = array();
                    $idxj = 0;
                    foreach ($share_comments as $vv) {
                        $share_comments_data[$idxj]['comment_id'] = $vv['comment_id'];
                        $share_comments_data[$idxj]['parent_id'] = $vv['parent_id'];
                        $share_comments_data[$idxj]['user_url'] = FU('u/index', array('uid' => $vv['user']['uid']));
                        $share_comments_data[$idxj]['user_name'] = $vv['user']['user_name'];
                        $share_comments_data[$idxj]['avt'] = avatar($vv['uid'], 's', $is_src = 1);
                        $share_comments_data[$idxj]['comment'] = cutStr($vv['content'], 20);
                        $idxj++;
                    }
                    $list[$i]['comments'] = $share_comments_data;
                }
                $list[$i]['share_url'] = FU('note/index', array('sid' => $v['share_id']));
                $list[$i]['u_url'] = FU('u/index', array('uid' => $v['uid']));
                $list[$i]['relay_count'] = FDB::resultFirst("select relay_count from " . FDB::table("share") . " where share_id = " . $v['share_id']);
                $album_sql = "select a.id,a.title from  " . FDB::table('album_share') . " as ah left join " . FDB::table('album') . " as a on ah.album_id = a.id where ah.share_id = " . $v['share_id'];
                $album = FDB::fetchFirst($album_sql);
                if ($album) {
                    $list[$i]['album_title'] = $album['title'];
                    $list[$i]['is_album'] = 1;
                    $list[$i]['album_url'] = FU("album/show", array('id' => $album['id']));
                } else {
                    $list[$i]['album_title'] = "";
                    $list[$i]['is_album'] = 0;
                    $list[$i]['album_url'] = "";
                }
                $list[$i]['user_name'] = FDB::resultFirst("select user_name from " . FDB::table('user') . " where uid =" . $v['uid']);
                $i++;
            }
        }
        if ($list) {
            $share_detail = $list[0];
        }
        $link_url = $_FANWE['site_url'] . "services/service.php?m=user&a=album_share&width=190&p=2&home_uid=" . $home_uid . "&album_id=" . $id;
        $json_url = $_FANWE['site_url'] . "services/service.php?m=user&a=album_share&width=190&home_uid=" . $home_uid . "&album_id=" . $id;
        include template('page/album/album_show');
        display();
    }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:101,代码来源:album.module.php

示例8: getHotCate


//.........这里部分代码省略.........
        $join_sql = ' LEFT JOIN ' . FDB::table('album_share') . ' AS als ON als.share_id = s.share_id ';
    }
    $audit_index = intval($_FANWE['setting']['audit_index']);
    if ($audit_index) {
        $condition .= " AND s.status =1 ";
    }
    $page = intval($_REQUEST['p']);
    $field = ",(s.create_time > {$day7_time}) AS time_sort ";
    $sort = " ";
    if ($sort_field == 'hot') {
        $sort = "  ORDER BY s.collect_count DESC ";
    } else {
        $sort = "  ORDER BY s.share_id DESC ";
    }
    $sql = 'SELECT DISTINCT(s.share_id),s.uid,s.content,s.collect_count,s.comment_count,s.create_time,s.cache_data ,s.parent_id ' . $field . '
					FROM ' . FDB::table('share') . ' AS s  ' . $join_sql . ' where s.share_data <> ' . " 'default' " . $condition . $sort . ' LIMIT ' . $page_num;
    $is_next = 1;
    $share_list = FDB::fetchAll($sql);
    $scale = 1;
    if ($share_list) {
        $share_list = FS('Share')->getShareDetailList($share_list, false, false, false, true, 2);
        $list = array();
        $current_user = array();
        $current_user['u_url'] = FU('u/index', array('uid' => $_FANWE['uid']));
        $current_user['avt'] = avatar($_FANWE['uid'], 's', $is_src = 1);
        $i = 0;
        foreach ($share_list as $k => $v) {
            $list[$i] = $v;
            $img = FDB::fetchFirst("select img,img_height,img_width,is_animate,video from " . FDB::table("share_photo") . " where share_id = " . $v['share_id'] . " and img <> '' ");
            if ($img['is_animate'] == 1) {
                $img_url = $img['img'];
            } else {
                $img_url = getImgName($img['img'], $img_width, 999, 2, true);
            }
            $is_video = 0;
            if (!empty($img['video'])) {
                $is_video = 1;
                $vedio_url = $img['video'];
            }
            $list[$i]['is_video'] = $is_video;
            $list[$i]['video'] = $vedio_url;
            //$img_url = getImgName($img['img'],$img_width,999,2,true);
            $list[$i]['share_img'] = $img_url;
            $list[$i]['height'] = $img['img_height'] * ($img_width / $img['img_width']);
            /*获取play图标的位置*/
            $list[$i]['video_style_top'] = ($list[$i]['height'] - 33) / 2;
            $list[$i]['video_style_right'] = (254 - 33) / 2;
            $list[$i]['height'] = round($list[$i]['height'] / $scale);
            $list[$i]['is_animate'] = $img['is_animate'];
            $list[$i]['width'] = $img_width;
            $list[$i]['avt'] = avatar($v['uid'], 's', $is_src = 1);
            $parent_id = FDB::resultFirst("select parent_id from " . FDB::table("share") . " where share_id = " . $v['share_id']);
            if ($parent_id == 0) {
                $list[$i]['isOriginal'] = 1;
            } else {
                $list[$i]['isOriginal'] = 0;
            }
            $list[$i]['likeStatus'] = FS('Share')->getIsCollectByUid($v['share_id'], $_FANWE['uid']) ? 1 : 0;
            $list[$i]['isMe'] = $v['uid'] == $_FANWE['uid'] ? 1 : 0;
            $list[$i]['is_relay'] = $v['is_relay'];
            //分享评论
            $share_comments = FS('Share')->getShareCommentList($v['share_id'], '0,2');
            if ($share_comments) {
                $share_comments_data = array();
                $idxj = 0;
                foreach ($share_comments as $vv) {
                    $share_comments_data[$idxj]['comment_id'] = $vv['comment_id'];
                    $share_comments_data[$idxj]['parent_id'] = $vv['parent_id'];
                    $share_comments_data[$idxj]['user_url'] = FU('u/album', array('uid' => $vv['user']['uid']));
                    $share_comments_data[$idxj]['user_name'] = $vv['user']['user_name'];
                    $share_comments_data[$idxj]['avt'] = avatar($vv['uid'], 's', $is_src = 1);
                    $share_comments_data[$idxj]['comment'] = cutStr($vv['content'], 20);
                    $idxj++;
                }
                $list[$i]['comments'] = $share_comments_data;
            }
            $list[$i]['share_url'] = FU('note/index', array('sid' => $v['share_id']));
            $list[$i]['u_url'] = FU('u/album', array('uid' => $v['uid']));
            $list[$i]['relay_count'] = FDB::resultFirst("select relay_count from " . FDB::table("share") . " where share_id = " . $v['share_id']);
            $album_sql = "select a.id,a.title from  " . FDB::table('album_share') . " as ah left join " . FDB::table('album') . " as a on ah.album_id = a.id where ah.share_id = " . $v['share_id'];
            $album = FDB::fetchFirst($album_sql);
            if ($album) {
                $list[$i]['album_title'] = $album['title'];
                $list[$i]['is_album'] = 1;
                $list[$i]['album_url'] = FU("album/show", array('id' => $album['id']));
            } else {
                $list[$i]['album_title'] = "";
                $list[$i]['is_album'] = 0;
                $list[$i]['album_url'] = "";
            }
            $list[$i]['user_name'] = FDB::resultFirst("select user_name from " . FDB::table('user') . " where uid =" . $v['uid']);
            $i++;
        }
        $args['list'] = $list;
    }
    $args['current_user'] = $current_user;
    $args['link_url'] = $link_url;
    $args['json_url'] = $json_url;
    return tplFetch('inc/index/index_cate', $args);
}
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:101,代码来源:functions.php

示例9: FS

     $list[$i]['isOriginal'] = 0;
 }
 $list[$i]['likeStatus'] = FS('Share')->getIsCollectByUid($v['share_id'], $_FANWE['uid']) ? 1 : 0;
 $list[$i]['isMe'] = $v['uid'] == $_FANWE['uid'] ? 1 : 0;
 //分享评论
 $share_comments = FS('Share')->getShareCommentList($v['share_id'], '0,2');
 if ($share_comments) {
     $share_comments_data = array();
     $idxj = 0;
     foreach ($share_comments as $vv) {
         $share_comments_data[$idxj]['comment_id'] = $vv['comment_id'];
         $share_comments_data[$idxj]['parent_id'] = $vv['parent_id'];
         $share_comments_data[$idxj]['user_url'] = FU('u/index', array('uid' => $vv['user']['uid']));
         $share_comments_data[$idxj]['user_name'] = $vv['user']['user_name'];
         $share_comments_data[$idxj]['avt'] = avatar($vv['uid'], 's', $is_src = 1);
         $share_comments_data[$idxj]['comment'] = cutStr($vv['content'], 20);
         $idxj++;
     }
     $list[$i]['comments'] = $share_comments_data;
 }
 $list[$i]['share_url'] = FU('note/index', array('sid' => $v['share_id']));
 $list[$i]['u_url'] = FU('u/index', array('uid' => $v['uid']));
 $list[$i]['relay_count'] = FDB::resultFirst("select relay_count from " . FDB::table("share") . " where share_id = " . $v['share_id']);
 $album_sql = "select a.id,a.title from  " . FDB::table('album_share') . " as ah left join " . FDB::table('album') . " as a on ah.album_id = a.id where ah.share_id = " . $v['share_id'];
 $album = FDB::fetchFirst($album_sql);
 if ($album) {
     $list[$i]['album_title'] = $album['title'];
     $list[$i]['is_album'] = 1;
     $list[$i]['album_url'] = FU("album/show", array('id' => $album['id']));
 } else {
     $list[$i]['album_title'] = "";
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:31,代码来源:share.php

示例10: setTplUserFormat

<li>
<?php 
                            if ($user_index > 4) {
                                break;
                            }
                            $user_index++;
                            echo setTplUserFormat($uid, 1, 0, 's', 32, '', 'r3 icard lazyload', '');
                            ?>
<a href="<?php 
                            echo FU('u/index', array("uid" => $uid));
                            ?>
" target="blank" class="fl"><span class="name" title="<?php 
                            echo $user;
                            ?>
"><?php 
                            echo cutStr($user, 8, '...');
                            ?>
</span></a>
<div class="follow fl">
<?php 
                            $is_follow = FS('User')->getIsFollowUId($uid);
                            if ($is_follow) {
                                ?>
<a onclick="$.User_Follow(<?php 
                                echo $uid;
                                ?>
,this,CateUpdateUserFollow);" href="javascript:;"><img src="./tpl/images/flow_ok.gif" /></a>
<?php 
                            } else {
                                ?>
<a onclick="$.User_Follow(<?php 
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:31,代码来源:inc_index_index_cate_share.tpl.php

示例11: intval

$folderid = intval($_GET["folderid"]);
if ($folderid > 0) {
    setCookies("lastfolderid", $folderid);
} else {
    $folderid = intval(getCookies("lastfolderid"));
}
//preview
setCookies("lastfoldertype", 2);
$pagerlink = "files.php?page={page}&folderid={$folderid}";
$condition = "folderid={$folderid}";
$orderstr = "id desc";
$pager = new Pager();
$pager->init(10, $curPage, $pagerlink);
$attachements = $pager->queryRows($db, "attachments", $condition, "*", $orderstr);
foreach ($attachements as $key => $att) {
    $att['shortfilename'] = htmlFilter(cutStr($att['filename'], 12));
    $att['filename'] = htmlFilter($att['filename']);
    $att['uploadtime'] = getDateStr($att['uploadtime']);
    $attachements[$key] = $att;
}
$folderrow = $cache_folders[$folderid];
$folderrow['title'] = htmlFilter($folderrow['title']);
print <<<EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>IMAGE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|ajax|admin"></script>
<body style="background:#fff;">
开发者ID:JackyMamba,项目名称:SimpleEOW,代码行数:31,代码来源:files.php

示例12: newaiinit_value


//.........这里部分代码省略.........
                        $TempDirPath = "./";
                    } else {
                        if (is_file("../../newai_ajax.php")) {
                            $TempDirPath = "../../Framework/";
                        } else {
                            $TempDirPath = '';
                        }
                    }
                    if (is_file("images/error.gif")) {
                        $PicDirPath = "./";
                    } else {
                        $PicDirPath = "../../Framework/";
                    }
                    $openDir = $TempDirPath . "newai_ajax.php?" . base64_encode($openDir);
                    //$filtervalue="<input type=\"text\" class=\"SmallInput\" size=\"$INPUT_SIZE\"  value=\"".$filtervalue."\" onkeyup=\"GetResult('".$openDir."&FieldValue='+this.value);\">";
                    if ($filtervalue == "1") {
                        $filtervalue = "<img onclick=\"listTable_boolean(this,'{$list_index}',{$AjaxID},'{$sessionkey}','{$tablename}','{$primarykey_index}','{$AjaxID}','{$list_index}','{$openDir}')\" src=\"" . $PicDirPath . "images/right.gif\" border=0>";
                    } else {
                        $filtervalue = "<img onclick=\"listTable_boolean(this,'{$list_index}',{$AjaxID},'{$sessionkey}','{$tablename}','{$primarykey_index}','{$AjaxID}','{$list_index}','{$openDir}')\" src=\"" . $PicDirPath . "images/error.gif\" border=0>";
                    }
                    break;
                case 'avatar':
                    $filtervalue = $fields['value'][$counter][$list_index];
                    $filepath = "images/avatar/{$filtervalue}.gif";
                    if (is_file($filepath)) {
                        $filtervalue = "<img src=\"{$filepath}\" border=0>";
                    } else {
                        $filtervalue = "<img src=\"images/avatar/9.gif\" border=0>";
                    }
                    break;
                case 'textarea':
                    $filtervalue = $fields['value'][$counter][$list_index];
                    $filtervalue = strip_tags(htmlspecialchars_decode($filtervalue));
                    if (cutStr($filtervalue, 25) != $filtervalue) {
                        $filtervalue = "<font title='{$filtervalue}'>" . cutStr($filtervalue, 25) . "</font>" . "...";
                    }
                    break;
                case 'textareabr':
                    $filtervalue = $fields['value'][$counter][$list_index];
                    $filtervaluetext = addslashes($filtervalue);
                    if (cutStr($filtervalue, 25) != $filtervalue) {
                        $filtervalue = "<font title='{$filtervaluetext}'>" . cutStr($filtervalue, 25) . "</font>" . "...";
                    }
                    //if(strlen($filtervalue)>50)	$filtervalue=substr($filtervalue,0,50)."...";
                    break;
                case 'readonlytextarea':
                    $filtervalue = $fields['value'][$counter][$list_index];
                    $filtervaluetext = addslashes($filtervalue);
                    if (cutStr($filtervalue, 25) != $filtervalue) {
                        $filtervalue = "<font title='{$filtervaluetext}'>" . cutStr($filtervalue, 25) . "</font>" . "...";
                    }
                    break;
                case 'idtoname_user':
                    $filtervalue = idtoname($fields['value'][$counter][$list_index], $mode = 'user');
                    break;
                case 'idtoname_course':
                    $filtervalue = idtoname($fields['value'][$counter][$list_index], $mode = 'course');
                    break;
                case 'idtoname_YuanXi':
                    $filtervalue = idtoname($fields['value'][$counter][$list_index], $mode = 'YuanXi');
                    break;
                case 'idtoname_dept':
                    $filtervalue = idtoname($fields['value'][$counter][$list_index], $mode = 'dept');
                    //$filtervalue=$fields['value'][$counter][$list_index];
                    break;
                case 'colorselect':
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:67,代码来源:newai_init.php

示例13: count

$sql = $sql . " order by pay_own desc limit 0 ,{$max_count}";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$count = $max_count - count($rs_a);
$module_body .= "<table border=\"0\"  width=\"100%\">";
if (count($rs_a) > 0) {
    for ($i = 0; $i < count($rs_a); $i++) {
        $rowid = $rs_a[$i]['rowid'];
        $num = $rs_a[$i]['num'];
        $supplyname = $rs_a[$i]['supplyname'];
        $own = number_format($rs_a[$i]['own'], 2);
        $huikuan = number_format($rs_a[$i]['huikuanjine'], 2);
        $pay_own = number_format($rs_a[$i]['pay_own'], 2);
        if (cutStr($supplyname, 6) != $supplyname) {
            $title = $supplyname;
            $supplyname = cutStr($supplyname, 6) . "..";
        }
        $module_body .= "<tr class=\"TableBlock\">\n\t   \t\t\t\t\t<td><img src=\"../images/arrow_r.gif\" align=\"absmiddle\"><a href=../../JXC/customer_newai.php?" . base64_encode("action=view_default&ROWID=" . $rs_a[$i]['rowid']) . " target=_blank title='{$title}'>" . $supplyname . "</td>\n\t\t\t\t\t\t<td><a href='../../JXC/v_yingshoukuanhuizong_mingxi.php?" . base64_encode("supplyid={$rowid}") . "' target='_blank'>单数:" . $num . "</a></td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">金额:" . $own . "</td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">回款:" . $huikuan . "</td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">尚欠:" . $pay_own . "</td>\n\t\t\t\t\t  </tr>";
        //$module_body .= "<li>".$boolen."&nbsp;".$rs_a[$i]['客户名称']."&nbsp;<font color=green><a href=crm_service_person_newai.php?action=view_default&编号=$编号; title=".$服务编号.">".$rs_a[$i]['服务概述']."</a></font>(<font color=green>[".$rs_a[$i]['服务阶段']."]</font>".$rs_a[$i]['创建时间'].")</li>";
    }
    for ($i = 0; $i < $count; $i++) {
        $module_body .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\">&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    }
}
if (count($rs_a) == 0) {
    $module_body .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\"><font color=\"red\">\n\t\t\t\t\t&nbsp;暂无应收款!</font></td>";
    for ($i = 0; $i < $count - 1; $i++) {
        $module_body .= "<tr class=\"TableBlock\">\n\t\t\t\t\t<td valign=\"Middle\" align=\"left\">&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    }
}
$module_body .= "</table>";
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:crm_mytable_yingshou.php

示例14: cutStr

    ?>
">《<?php 
    echo cutStr($share_item['title'], 30, '...');
    ?>
》</a>
<?php 
} elseif ($share_item['type'] == 'album_item') {
    ?>
加入杂志社<a target="_blank" title="<?php 
    echo $share_item['title'];
    ?>
" href="<?php 
    echo FU('album/show', array("id" => $share_item['rec_id']));
    ?>
">《<?php 
    echo cutStr($share_item['title'], 30, '...');
    ?>
》</a>
<?php 
    if ($share_item['rec_uid'] > 0) {
        ?>
收入自 @<?php 
        echo setTplUserFormat($share_item['rec_uid'], 0, 0, '', 0, '', '', '');
    }
}
if ($share_item['is_rec_best'] == 1) {
    ?>
<img style="vertical-align:-3px; _vertical-align:-2px;" src="./tpl/images/topic_tj.png" />
<?php 
}
?>
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:31,代码来源:services_share_u_share_item.tpl.php

示例15: replyMsg

 /**
  * 回复信息
  * @param int $mlid 信件组编号
  * @param int $fuid 发信会员编号
  * @param string $fusername 发信会员名称
  * @param string $message 信件内容
  * @return int
  */
 public function replyMsg($mlid, $fuid, $fusername, $message)
 {
     if (empty($mlid) || empty($fuid) || empty($fusername) || empty($message)) {
         return 0;
     }
     $mlist = FDB::fetchFirst("SELECT * FROM " . FDB::table('user_msg_list') . " WHERE mlid='{$mlid}'");
     if (empty($mlist)) {
         return MSG_MLIST_NONE_ERROR;
     }
     if ($mlist['type'] == 1) {
         $users = explode('_', $mlist['min_max']);
         if ($users[0] == $fuid) {
             $tuid = $users[1];
         } elseif ($users[1] == $fuid) {
             $tuid = $users[0];
         } else {
             return MSG_PRIVILEGE_NONE_ERROR;
         }
     }
     $members = array();
     $query = FDB::query("SELECT * FROM " . FDB::table('user_msg_member') . " WHERE mlid='{$mlid}'");
     while ($member = FDB::fetch($query)) {
         $members[$member['uid']] = "('{$member['uid']}')";
     }
     if (!isset($members[$fuid])) {
         return MSG_PRIVILEGE_NONE_ERROR;
     }
     $last_msg = htmlspecialchars(cutStr(clearExpress(trim($message)), 150));
     $type = 0;
     FDB::query("INSERT INTO " . FDB::table('user_msg_index') . "(mlid) VALUES('{$mlid}')");
     $miid = FDB::insertId();
     FDB::query("INSERT INTO " . MessageService::getTablaName($mlid) . "(miid,mlid,uid,message,dateline,status) VALUES('{$miid}', '{$mlid}', '{$fuid}', '{$message}', '" . TIME_UTC . "', 0)");
     if ($mlist['type'] == 1) {
         $msg_config = array('last_uid' => $fuid, 'last_user_name' => $fusername, 'last_msg' => $last_msg);
         $msg_config = addslashes(serialize($msg_config));
         $result = FDB::query("INSERT INTO " . FDB::table('user_msg_member') . "(mlid, uid, is_new, num, last_update, last_dateline) VALUES('{$mlid}', '{$tuid}', '1', '1', '0', '" . TIME_UTC . "')", 'SILENT');
         if (!$result) {
             FDB::query("UPDATE " . FDB::table('user_msg_member') . " SET is_new = 1, num = num + 1, last_dateline='" . TIME_UTC . "' WHERE mlid='{$mlid}' AND uid='{$tuid}'");
         }
         FDB::query("UPDATE " . FDB::table('user_msg_member') . " SET is_new = 0, num = num + 1, last_update='" . TIME_UTC . "', last_dateline='" . TIME_UTC . "' WHERE mlid='{$mlid}' AND uid='{$fuid}'");
     } else {
     }
     FDB::query("UPDATE " . FDB::table('user_msg_list') . " SET msg_config='{$msg_config}' WHERE mlid='{$mlid}'");
     $result = FDB::query("INSERT INTO " . FDB::table('user_notice') . "(uid, type, num, create_time) VALUES('{$tuid}',5,1,'" . TIME_UTC . "')", 'SILENT');
     if (!$result) {
         FDB::query("UPDATE " . FDB::table('user_notice') . " SET num = num + 1, create_time='" . TIME_UTC . "' WHERE uid='{$tuid}' AND type=5");
     }
     return $miid;
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:57,代码来源:message.service.php


注:本文中的cutStr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。