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


PHP Reports::updateReportField方法代码示例

本文整理汇总了PHP中Reports::updateReportField方法的典型用法代码示例。如果您正苦于以下问题:PHP Reports::updateReportField方法的具体用法?PHP Reports::updateReportField怎么用?PHP Reports::updateReportField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Reports的用法示例。


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

示例1: Reports

<?php

require_once "../config.inc.php";
session_start();
$uid = $_REQUEST['id'];
$info = $_REQUEST['info'];
$field_name = $_REQUEST['field_name'];
$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
$db->connect();
$r = new Reports('member', BASE_DOMAIN);
$update = $r->updateReportField($uid, $info, $field_name);
开发者ID:autonomous019,项目名称:fsi,代码行数:11,代码来源:reports_updater.php

示例2: Reports

require_once "../config.inc.php";
session_start();
print_r($_REQUEST);
print_r($_FILES);
$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
$db->connect();
$mode = $_REQUEST['mode'];
if ($mode === "reports") {
    $file = $_FILES['file']['name'];
    $temp_file = $_FILES['file']['tmp_name'];
    $uid = $_REQUEST['uid'];
    $upload_dir = '/reports/';
    $r = new Reports('member', BASE_DOMAIN);
    $upload_file = $r->uploader($file, $temp_file, $upload_dir);
    $update = $r->updateReportField($uid, $file, 'file_info');
} elseif ($mode === "users") {
    $file = $_FILES['file']['name'];
    $temp_file = $_FILES['file']['tmp_name'];
    $uid = $_REQUEST['uid'];
    $upload_dir = '/avatars/';
    $u = new Users('member', BASE_DOMAIN);
    $upload_file = $u->uploader($file, $temp_file, $upload_dir);
    $update = $u->updateUserField($uid, $file, 'avatar');
} elseif ($mode === "projects") {
    $uid = $_REQUEST['uid'];
    if (!empty($_FILES['vertical_img']['name'])) {
        $vertical_file = $_FILES['vertical_img']['name'];
        $vertical_temp_file = $_FILES['vertical_img']['tmp_name'];
    } else {
        $vertical_file = "";
开发者ID:autonomous019,项目名称:fsi,代码行数:30,代码来源:uploader.php


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