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


PHP Images::has_pic方法代碼示例

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


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

示例1: Images

    }
}
if (isset($_GET['action'])) {
    $image = new Images();
    $info = $image->get_pic_info($_GET['id']);
    $info->size = human_filesize($info->size);
    echo json_encode((array) $info);
    exit;
}
// upload or change
if (!isset($_FILES['file'])) {
    header('Location: /404.php');
}
$_FILES = $_FILES['file'];
$image = new Images();
if (Images::has_pic(USER_ID)) {
    if ($image->change_profile_pic()) {
        echo json_encode(array('action' => 'update', 'status' => 'success', 'path' => $image->path, 'id' => $image->id));
        exit;
    } else {
        echo json_encode(array('status' => 'fail', 'errMsg' => $image->errMsg, 'id' => $image->id));
        exit;
    }
} else {
    if ($image->upload_profile_pic()) {
        echo json_encode(['status' => 'success', 'path' => $image->path, 'id' => $image->id]);
        exit;
    } else {
        echo json_encode(array('status' => 'fail', 'errMsg' => $image->errMsg, 'id' => $image->id));
        exit;
    }
開發者ID:khaledkhalil94,項目名稱:SH.A,代碼行數:31,代碼來源:profilePic.php

示例2: count

$emptyLinks = false;
if (empty($website) && empty($skype) && empty($twitter) && empty($github) && empty($facebook)) {
    $emptyLinks = true;
}
$self = $session->userCheck($user);
$emailP = $user->email_privacy;
$locationP = $user->location_privacy;
$phoneNumberP = $user->phoneNumber_privacy;
$genderP = $user->gender_privacy;
$birthP = $user->birthDate_privacy;
$pub = $emailP && $locationP && $phoneNumberP && $genderP && $birthP ? true : false;
$custom = ($emailP || $locationP || $phoneNumberP || $genderP || $birthP) && !$pub ? true : false;
$linksP = $user->links_privacy;
$public = "<i title=\"Public\" class=\"world icon\"></i>";
$private = "<i title=\"Private\" class=\"lock icon\"></i>";
$has_pic = Images::has_pic($id);
$q_count = count($QNA->get_questions_by_user($id));
$following = $userg->get_flwing($id);
$following_count = count($following);
$followers = $userg->get_flwers($id);
$followers_count = count($followers);
if (USER_ID) {
    $saved_count = count($QNA->get_saved(USER_ID));
}
$pageTitle = $name;
$sec = 'profile';
include ROOT_PATH . "inc/head.php";
?>
<div class="ui ui container section">
<?php 
if ($session->is_logged_in() && !$self) {
開發者ID:khaledkhalil94,項目名稱:SH.A,代碼行數:31,代碼來源:profile.php


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