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


PHP Files::get_by_id方法代码示例

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


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

示例1: get_file_by_id

 /**
  * Get file details using id
  * 
  * @param int $id File Id
  * @return object
  */
 private function get_file_by_id($id)
 {
     $files = new Files();
     return $files->get_by_id($id);
 }
开发者ID:qaribhaider,项目名称:sqhr-download-manager,代码行数:11,代码来源:class.public.main.php

示例2: get_user_folder

 public function get_user_folder()
 {
     $users_folder = Files::get_by_id(7, 'dir');
     return Files::find_in_dir($users_folder, $this->username);
 }
开发者ID:radiowarwick,项目名称:digiplay,代码行数:5,代码来源:User.php

示例3:

<?php

Output::set_title("Administration");
MainTemplate::set_subtitle("Control every aspect of the Digiplay system");
$trash = Files::get_by_id(3, "dir");
echo "\n<div class=\"row\">\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "admin/music\">\n\t\t\t<div class=\"panel panel-info\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("volume-up icon-huge") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . Tracks::get_total_tracks() . "</h2>\n\t\t\t\t\t\t\t<h4>tracks</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "admin/users\">\n\t\t\t<div class=\"panel panel-success\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("user icon-huge") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . Users::count() . "</h2>\n\t\t\t\t\t\t\t<h4>users</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "showplans\">\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("tasks icon-huge") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . Showplans::count() . "</h2>\n\t\t\t\t\t\t\t<h4>showplans</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n</div>\n<div class=\"row\">\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "audiowalls\">\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("th icon-huge\" style=\"margin-top: -4px;") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . AudiowallSets::count() . "</h2>\n\t\t\t\t\t\t\t<h4>audiowalls</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "email\">\n\t\t\t<div class=\"panel panel-warning\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("envelope icon-huge") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . Emails::count_unread() . "</h2>\n\t\t\t\t\t\t\t<h4>e-mails</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n\t<div class=\"col-sm-4\">\n\t\t<a href=\"" . LINK_ABS . "admin/trash\">\n\t\t\t<div class=\"panel panel-danger\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<div class=\"row dashboard-stamp\">\n\t\t\t\t\t\t<div class=\"col-xs-5\">\n\t\t\t\t\t\t\t" . Bootstrap::glyphicon("trash icon-huge") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-xs-7\">\n\t\t\t\t\t\t\t<h2>" . $trash->count() . "</h2>\n\t\t\t\t\t\t\t<h4>in trash</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</a>\n\t</div>\n</div>";
开发者ID:radiowarwick,项目名称:digiplay,代码行数:6,代码来源:index.php

示例4: json_encode

<?php

if (!isset($_REQUEST["id"]) || !($file = Files::get_by_id($_REQUEST["id"]))) {
    http_response_code(400);
    exit(json_encode(array("error" => "Invalid directory specified, or no permission to read it.")));
}
$children = $file->get_children();
$return = array();
foreach ($children as $child) {
    $array = array("title" => $child->get_name(), "key" => $child->get_itemtype() . $child->get_id(), "id" => $child->get_id(), "type" => $child->get_itemtype());
    if ($child->get_itemtype() == "dir") {
        $array["folder"] = true;
    }
    if ($child->has_children()) {
        $array["lazy"] = true;
    }
    $return[] = $array;
}
echo json_encode($return);
开发者ID:radiowarwick,项目名称:digiplay,代码行数:19,代码来源:file-tree.php

示例5: parseFileId

 /**
  * Parse file id to return file url
  * 
  * @param int $fileid
  * @return string
  */
 function parseFileId($fileid = null)
 {
     if (!$fileid) {
         return '-';
     }
     require_once SQHR_DM_PLUGIN_PATH . 'system/controllers/class.files.php';
     $files = new Files();
     $file = $files->get_by_id($fileid);
     if ($file) {
         $fileurl = $file->file_url;
         $siteurl = get_site_url() . '/';
         if (strpos($fileurl, $siteurl) !== false) {
             $fileurl = str_replace($siteurl, '', $fileurl);
         }
         return $fileurl;
     } else {
         return '-';
     }
 }
开发者ID:qaribhaider,项目名称:sqhr-download-manager,代码行数:25,代码来源:wp.list.data.downloads.php

示例6: getfileAction

 /**
  * get the file attached into the order
  */
 public function getfileAction()
 {
     $id = $this->getRequest()->getParam('id');
     $file = Files::get_by_id($id);
     if (!empty($file)) {
         if (!Files::downloadbykey($file['publickey'])) {
             $this->_helper->redirector('list', 'orders', 'admin', array('mex' => $this->translator->translate('There was a problem'), 'status' => 'danger'));
         }
     }
     $this->_helper->redirector('list', 'orders', 'admin', array('mex' => $this->translator->translate('There was a problem'), 'status' => 'danger'));
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:14,代码来源:OrdersController.php

示例7: foreach

        if (!$ldap) {
            $count++;
            echo "Disabling user " . $user->get_username() . " as they are not in LDAP at all...<br />";
            $user->set_enabled(false);
            $user->save();
            $folder = $user->get_user_folder();
            $folder->set_parent($expired_users);
            $folder->save();
        }
    }
    echo $count . " users disabled.";
}
if (isset($_REQUEST["update_ex_members"])) {
    $count = 0;
    $expired_users = Files::get_by_id(2624, 'dir');
    $ex_members = Files::get_by_id(2625, 'dir');
    foreach (Users::get_enabled() as $user) {
        if ($user->is_ghost()) {
            continue;
        }
        $ldap = $user->get_ldap_attributes();
        if (!$ldap) {
            $count++;
            echo "Disabling user " . $user->get_username() . " as they are not in LDAP at all...<br />";
            $user->set_enabled(false);
            $user->save();
            $folder = $user->get_user_folder();
            $folder->set_parent($expired_users);
            $folder->save();
        } else {
            if (isset($ldap["yearDisabled"]) && $ldap["yearDisabled"][0] != '0') {
开发者ID:radiowarwick,项目名称:digiplay,代码行数:31,代码来源:index.php

示例8: get_parent

 public function get_parent()
 {
     return Files::get_by_id($this->parent);
 }
开发者ID:radiowarwick,项目名称:digiplay,代码行数:4,代码来源:File.php


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