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


PHP data类代码示例

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


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

示例1: data

 function data($data)
 {
     if (!empty($data)) {
         $dataF = new data($data);
         return $dataF->dataBrasileira($dataF->tratarDataZend($data, "americano"));
     }
 }
开发者ID:hackultura,项目名称:novosalic,代码行数:7,代码来源:GerarimprimirpdfController.php

示例2: company

 function company()
 {
     if (!isset($_GET['id']) or $_GET['id'] == 1) {
         $this->error('没有该企业的信息');
     }
     $uid = intval($_GET['id']);
     //企业ID
     $db = M('company_info');
     $company = $db->where('uid=' . $uid)->find();
     if (!$company) {
         $this->error('没有该企业的信息');
     }
     $cond = array('uid' => $uid, 'expiration_time>' . time(), 'verify=1', 'state=1');
     $recruits = $db->table('recruit')->where($cond)->field('recruit_id,start_time,recruit_name')->findall();
     $data = new data('recruit');
     $company = $data->convert($company);
     $this->assign('company', $company);
     $this->assign('recruits', $recruits);
     if (empty($company['tpl_style'])) {
         $company['tpl_style'] = 'skyblue';
         //默认风格
     }
     if (!empty($_GET['style']) && $uid == $_SESSION['uid']) {
         //企业预览模板
         $company['tpl_style'] = $_GET['style'];
     }
     $this->display(PATH_ROOT . '/templates/company_tpl/' . $company['tpl_style'] . '/index');
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:28,代码来源:indexControl.php

示例3: __construct

 /**
  * Create new Scaffold instance
  *
  * @param Array $data
  */
 public function __construct($data)
 {
     $this->data = new DataSystem($data);
     $this->names = new NamesGenerate($data);
     $this->paths = new Paths($this->names);
     $this->generator = new Generator($this->data->dataScaffold('view'), $this->data->dataScaffold('migration'), $this->names, $this->paths);
 }
开发者ID:shoully,项目名称:scaffold-interface,代码行数:12,代码来源:Scaffold.php

示例4: outputHowTo

 public function outputHowTo($i_howtoID)
 {
     $objThis_M = new data();
     $s_sql = "select\r\n\t\t\t    D.howtoName,\r\n\t\t\t    C.chapterID, \r\n\t\t\t    C.chapterName, \r\n\t\t\t    C.displayOrder,\r\n\t\t\t    H.headingID,\r\n\t\t\t    H.displayOrder,\r\n\t\t\t    H.headingName,\r\n\t\t\t    T.contentID,\r\n\t\t\t    T.contentTitle,\r\n\t\t\t    T.displayOrder,\r\n\t\t\t    T.howtoContent\r\n\t\t\tfrom cms.dyn_howto_document D\r\n\t\t\tinner join cms.dyn_howto_content T\r\n\t\t\t    on D.howtoID = T.howtoID\r\n\t\t\tleft join cms.cfg_howto_headings H\r\n\t\t\t    on T.headingID = H.headingID \r\n\t\t\tinner join cms.cfg_howto_chapters C\r\n\t\t\t    on T.chapterID = C.chapterID \r\n\t\t\twhere D.howtoID = {$i_howtoID} \r\n\t\t\torder by\r\n\t\t\t    C.displayOrder,\r\n\t\t\t    H.displayOrder,\r\n\t\t\t    T.displayOrder,\r\n\t\t\t    T.howtoContent;";
     $q_getData = $objThis_M->runSQL($s_sql);
     $objThis_V = new view();
     $s_main = $objThis_V->outputHowTo($q_getData);
     return $s_main;
 }
开发者ID:braddoro,项目名称:braddoro,代码行数:9,代码来源:howto_c.php

示例5: dataDropdown

 function dataDropdown($name, $id, $currentValue, $sql)
 {
     include "test_lib_m.php";
     $objThis_S = new data();
     $q_data = $objThis_S->getData($sql = $sql);
     include "test_lib_v.php";
     $objThis_V = new display();
     $tmpX = $objThis_V->showBox($name = $name, $id = $id, $q_query = $q_data, $currentValue = $currentValue);
     return $tmpX;
 }
开发者ID:braddoro,项目名称:braddoro,代码行数:10,代码来源:connect_lib_c.php

示例6: insert

function insert()
{
    if (isset($_POST)) {
        foreach ($_POST as $index => $valeur) {
            $donnees[$index] = $valeur;
        }
    }
    $data = new data();
    $data->insert($donnees);
}
开发者ID:neewom,项目名称:recherche,代码行数:10,代码来源:insert.php

示例7: update

function update()
{
    if (array_key_exists("id", $_POST)) {
        foreach ($_POST as $index => $valeur) {
            $donnees[$index] = $valeur;
        }
    }
    $data = new data();
    $data->update($donnees);
}
开发者ID:neewom,项目名称:recherche,代码行数:10,代码来源:modif.php

示例8: __construct

 public function __construct($name, $param = array())
 {
     parent::__construct($name, $param);
     if (!file_exists(PATH_ROOT . '/' . DIR_CACHE . '/captcha')) {
         mkdir(PATH_ROOT . '/' . DIR_CACHE . '/captcha');
         chmod(PATH_ROOT . '/' . DIR_CACHE . '/captcha', 0777);
     }
     $opt = new data(array('font' => PATH_ROOT . '/' . DIR_LIBRARY . '/font/arial.ttf', 'imgDir' => PATH_ROOT . '/' . DIR_CACHE . '/captcha', 'imgUrl' => '/' . DIR_CACHE . '/captcha', 'wordlen' => 4, 'dotNoiseLevel' => 0, 'lineNoiseLevel' => 0, 'fsize' => 20, 'width' => 100, 'height' => 60));
     if (isset($param['captcha'])) {
         $opt->set($param['captcha']);
     }
     $this->captcha = new Zend\Captcha\Image($opt->to_array());
     $this->validator['captcha'] = array('captcha' => $this->captcha);
 }
开发者ID:s-kalaus,项目名称:ekernel,代码行数:14,代码来源:captcha.php

示例9: form

 protected function form($user = null)
 {
     $mode = $user ? 'edit' : 'add';
     $fields = data::read(panel()->roots()->forms() . DS . 'user.' . $mode . '.php', 'yaml');
     $content = $user ? $user->data() : array();
     // add all languages
     $fields['language']['options'] = array();
     $fields['language']['default'] = kirby()->option('panel.language', 'en');
     foreach (panel()->languages() as $code => $lang) {
         $fields['language']['options'][$code] = $lang->title();
     }
     // add all roles
     $fields['role']['options'] = array();
     $fields['role']['default'] = site()->roles()->findDefault()->id();
     foreach (site()->roles() as $role) {
         $fields['role']['options'][$role->id()] = $role->name();
     }
     // make the role selector readonly when the user is not an admin
     if (!site()->user()->isAdmin()) {
         $fields['role']['readonly'] = true;
     }
     // make sure the password is never shown in the form
     unset($content['password']);
     return new Form($fields, $content);
 }
开发者ID:aoimedia,项目名称:kosmonautensofa,代码行数:25,代码来源:users.php

示例10: info

 public function info()
 {
     if (!is_null($this->info)) {
         return $this->info;
     }
     return $this->info = new Obj(data::read($this->root . DS . 'package.json'));
 }
开发者ID:irenehilber,项目名称:kirby-base,代码行数:7,代码来源:translation.php

示例11: statusDiligencia

 /**
  * Método para verificar o status da diligencia
  * @access public
  * @param integer $idPronac
  * @return string
  */
 public function statusDiligencia($idPronac = null, $idProduto = null)
 {
     if (isset($idPronac) && !empty($idPronac)) {
         $where['idPronac = ?'] = $idPronac;
     }
     if (isset($idProduto) && !empty($idProduto)) {
         $where['idProduto = ?'] = $idProduto;
     }
     $diligencias = array();
     $Diligencia = new Diligencia();
     $buscar = $Diligencia->buscar($where);
     foreach ($buscar as $d) {
         if ($d[0]->DtSolicitacao && $d[0]->DtResposta == NULL) {
             $diligencias['img'] = "notice.png";
             $diligencias['msg'] = "Diligenciado";
         } else {
             if ($d[0]->DtSolicitacao && $d[0]->DtResposta != NULL) {
                 $diligencias['img'] = "notice3.png";
                 $diligencias['msg'] = "Diligencia respondida";
             } else {
                 if ($d[0]->DtSolicitacao && round(data::CompararDatas($d[0]->DtDistribuicao)) > $d[0]->tempoFimDiligencia) {
                     $diligencias['img'] = "notice2.png";
                     $diligencias['msg'] = "Diligencia não respondida";
                 } else {
                     $diligencias['img'] = "notice1.png";
                     $diligencias['msg'] = "A Diligenciar";
                 }
             }
         }
     }
     return 'Não terminei';
 }
开发者ID:hackultura,项目名称:novosalic,代码行数:38,代码来源:StatusDiligencia.php

示例12: makeHtml

 public function makeHtml($id, $path)
 {
     self::filter($path);
     $array = data::getData($path);
     $html = '';
     $total = '';
     foreach ($array as $k => $v) {
         if ($k) {
             $t = $id ? $id . '_' . $k : $k;
             $name = $v[0] !== '-' ? '<a href="javascript:;" id="a_' . $t . '" path="' . $path . '">' . $v[1] . '</a>' : $v[1];
             if ($id) {
                 $blank = "";
                 $b_count = count(explode("_", $id));
                 for ($i = 1; $i < $b_count; $i++) {
                     $blank .= "&nbsp;&nbsp;";
                 }
                 $name = $blank . $name;
             }
             $name = $id ? "&nbsp;&nbsp;" . $name : $name;
             $html .= "<div id='d_" . $t . "'>\n\t<span class='content' style='width:30px;text-align: center'><input type='checkbox' id='c_" . $t . "'/></span>\n\t<span class='content' style='width:680px;padding-left: 20px'>" . $name . "</span>\n\t<span class='content' style='width:150px'>" . $v[2] . "</span>\n\t<span class='content' style='width:80px;text-align: right'>" . $v[3] . "</span>\n</div>";
         } else {
             $total_t = $id ? $id . "_total" : "total";
             $total = "<div id='d_" . $total_t . "'>\n\t<span class='content' style='width:30px;text-align: center'></span>\n\t<span class='content' style='width:680px;padding-left: 20px'></span>\n\t<span class='content' style='width:150px'></span>\n\t<span class='content' style='width:80px;text-align: right'>总计:" . $v . "</span>\n</div>";
         }
     }
     return $html . $total;
 }
开发者ID:envylv,项目名称:home,代码行数:27,代码来源:fac.php

示例13: tearDown

 public function tearDown()
 {
     $this->noPhpWebserver();
     $this->noSelenium();
     $this->module->_after($this->makeTest());
     data::clean();
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:7,代码来源:SeleniumTest.php

示例14: init

function init()
{
    $data = new data();
    $donnees = $data->getIndexData();
    foreach ($donnees->fetchAll(PDO::FETCH_ASSOC) as $key => $value) {
        foreach ($value as $key2 => $value2) {
            if ($key2 == "reponse") {
                $value[$key2] = $data->getStatus($value2);
            }
        }
        $list[$key] = $value;
    }
    $smarty = new Smarty();
    $smarty->assign(array('list' => $list, 'tpl_name' => "index"));
    $smarty->display('base.tpl');
}
开发者ID:neewom,项目名称:recherche,代码行数:16,代码来源:index.php

示例15: load

 public function load($name)
 {
     // make sure there's no path included in the name
     $name = basename(strtolower($name));
     if (isset(static::$cache[$name])) {
         $this->file = static::$cache[$name]['file'];
         $this->name = static::$cache[$name]['name'];
         $this->yaml = static::$cache[$name]['yaml'];
         return true;
     }
     // find the matching blueprint file
     $file = kirby()->get('blueprint', $name);
     if ($file) {
         $this->file = $file;
         $this->name = $name;
         $this->yaml = data::read($this->file, 'yaml');
         // remove the broken first line
         unset($this->yaml[0]);
         static::$cache[$name] = array('file' => $this->file, 'name' => $this->name, 'yaml' => $this->yaml);
         return true;
     } else {
         if ($name == 'default') {
             throw new Exception(l('blueprints.error.default.missing'));
         } else {
             return $this->load('default');
         }
     }
 }
开发者ID:nsteiner,项目名称:kdoc,代码行数:28,代码来源:blueprint.php


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