當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Attachments::findCount方法代碼示例

本文整理匯總了PHP中Attachments::findCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attachments::findCount方法的具體用法?PHP Attachments::findCount怎麽用?PHP Attachments::findCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Attachments的用法示例。


在下文中一共展示了Attachments::findCount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Attachment

uses("attachment", "album");
check_permission("album");
$attachment_controller = new Attachment('pic');
$attachment = new Attachments();
$album = new Albums();
$tpl_file = "album";
$page = new Pages();
if (empty($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_POST['do'])) {
    pb_submit_check('album');
    $vals = $_POST['album'];
    $vals['title'] = $title = trim($vals['title']);
    $vals['description'] = $description = trim($vals['description']);
    $now_album_amount = $attachment->findCount(null, "created>" . $today_start . " AND member_id=" . $_SESSION['MemberID']);
    if (!empty($_FILES['pic']['name'])) {
        $type_id = 1;
        $attach_id = empty($id) ? "album-" . $_SESSION['MemberID'] . "-" . ($album->getMaxId() + 1) : "album-" . $_SESSION['MemberID'] . "-" . $id;
        $attachment_controller->title = $title;
        $attachment_controller->description = $description;
        $attachment_controller->rename_file = $attach_id;
        $attachment_controller->upload_process($type_id);
    }
    if (!empty($id)) {
        if (empty($attachment_controller->id)) {
            $attachment_id = $pdb->GetOne("SELECT attachment_id FROM {$tb_prefix}albums WHERE id=" . $id);
        } else {
            $attachment_id = $attachment_controller->id;
        }
        $sql = "UPDATE {$tb_prefix}attachments a,{$tb_prefix}albums ab SET a.title='" . $title . "',a.description='" . $description . "',ab.attachment_id={$attachment_id},type_id='" . $vals['type_id'] . "' WHERE ab.id={$id} AND a.id=" . $attachment_id;
開發者ID:vuong93st,項目名稱:w-game,代碼行數:31,代碼來源:album.php

示例2: Attachment

uses("attachment", "album");
check_permission("album");
$attachment_controller = new Attachment('pic');
$attachment = new Attachments();
$album = new Albums();
$tpl_file = "album";
$page = new Pages();
if (!$company->Validate($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_POST['do'])) {
    pb_submit_check('album');
    $vals = $_POST['album'];
    $vals['title'] = $title = trim($vals['title']);
    $vals['description'] = $description = trim($vals['description']);
    $now_album_amount = $attachment->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
    $id = intval($_POST['id']);
    if (!empty($_FILES['pic']['name'])) {
        $type_id = 1;
        $attach_id = empty($id) ? "album-" . $the_memberid . "-" . ($album->getMaxId() + 1) : "album-" . $the_memberid . "-" . $id;
        $attachment_controller->title = $title;
        $attachment_controller->description = $description;
        $attachment_controller->rename_file = $attach_id;
        $attachment_controller->upload_process($type_id);
    }
    if (!empty($id)) {
        if (empty($attachment_controller->id)) {
            $attachment_id = $pdb->GetOne("SELECT attachment_id FROM {$tb_prefix}albums WHERE id=" . $id);
        } else {
            $attachment_id = $attachment_controller->id;
        }
開發者ID:renduples,項目名稱:alibtob,代碼行數:31,代碼來源:album.php


注:本文中的Attachments::findCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。