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


PHP camila_error_page函数代码示例

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


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

示例1: draw

 function draw(&$form)
 {
     parent::draw($form);
     $text = new CHAW_text($this->title . $this->labelseparator);
     $text->set_br(0);
     if (!empty($this->title)) {
         $form->add_text($text);
     }
     $mySelect = new CHAW_select($this->key);
     global $_CAMILA;
     $_CAMILA['db']->SetFetchMode(ADODB_FETCH_ASSOC);
     $result = $_CAMILA['db']->Execute($this->query);
     if ($result === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     }
     $val = '';
     while (!$result->EOF) {
         if ($result->fields[$this->lbkey] == $this->value) {
             $mySelect->add_option($result->fields[$this->lbvalue], $result->fields[$this->lbkey], HAW_SELECTED);
             $val = $result->fields[$this->lbvalue];
         } else {
             $mySelect->add_option($result->fields[$this->lbvalue], $result->fields[$this->lbkey]);
         }
         $result->MoveNext();
     }
     if ($this->updatable) {
         $form->add_select($mySelect);
         $text = new CHAW_text('');
         $form->add_text($text);
     } else {
         $text = new CHAW_text($val);
         $form->add_text($text);
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:34,代码来源:sql_listbox.php

示例2: validate

 function validate()
 {
     if ($_REQUEST[$this->form->table . '_sess_mode'] != 'insert') {
         return true;
     }
     parent::validate();
     if ($this->value != '' and $this->maxlength > 0) {
         $this->form->validator->length($this->field, '<=', $this->maxlength);
     }
     if ($this->alphanumeric) {
         $this->form->validator->alphaNumeric($this->field);
     } else {
         $this->form->validator->alpha($this->field);
     }
     if ($this->value != '') {
         global $_CAMILA;
         $query = 'select * from ' . $this->form->table . ' where ' . $this->field . '=' . $_CAMILA['db']->Quote($this->value);
         $result = $_CAMILA['db']->Execute($query);
         if ($result === false) {
             camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
         }
         if ($result->RecordCount() > 0) {
             $this->form->validator->setError($this->field, 907);
         }
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:26,代码来源:db_key_textbox.php

示例3: camila_news_counter_value

function camila_news_counter_value($usergroup, $service_id)
{
    global $_CAMILA;
    $result = $_CAMILA['db']->Execute("select value from camila_news_counters where usergroup=? and service_id=?", array($usergroup, $service_id));
    if ($result === false) {
        camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
    }
    return $result->fields['value'];
}
开发者ID:umbecr,项目名称:camilaframework,代码行数:9,代码来源:news.inc.php

示例4: worktable_get_next_autoincrement_value

function worktable_get_next_autoincrement_value($table, $column)
{
    global $_CAMILA;
    $result = $_CAMILA['db']->Execute('select max(' . $column . ') as id from ' . $table);
    if ($result === false) {
        camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
    }
    return intval($result->fields['id']) + 1;
}
开发者ID:umbecr,项目名称:camilaframework,代码行数:9,代码来源:worktable_worktable2.inc.php

示例5: draw

 function draw(&$form)
 {
     parent::draw($form);
     $text = new CHAW_text($this->title . $this->labelseparator);
     $text->set_br(1);
     if (!empty($this->title)) {
         $form->add_text($text);
     }
     $select_all = new CHAW_js('<div class="camilacheckall" id="camilacheckall"><a id="CheckAll_' . $this->key . '" href="">' . camila_get_translation('camila.form.checkall') . '</a> ' . camila_get_translation('camila.form.checkallseparator') . ' <a id="UncheckAll_' . $this->key . '" href="">' . camila_get_translation('camila.form.uncheckall') . '</a></div>');
     $form->add_userdefined($select_all);
     global $_CAMILA;
     $_CAMILA['db']->SetFetchMode(ADODB_FETCH_ASSOC);
     $result = $_CAMILA['db']->Execute($this->query);
     if ($result === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     }
     $count = 0;
     //          while (!$result->EOF) {
     for ($i = 0; $i < count($this->values); $i++) {
         //              $myHidden = new CHAW_hidden($this->key . '_labels_'.$count, $result->fields[$this->label_field]);
         //              $form->add_input($myHidden);
         if ($this->values[$i] == '') {
             $myImage = new CHAW_image(CAMILA_IMG_DIR . 'wbmp/nocheck.wbmp', CAMILA_IMG_DIR . 'png/nocheck.png', '-');
             $myImage->set_br(0);
             $form->add_image($myImage);
             $text = new CHAW_text($this->labels[$i]);
             $form->add_text($text);
         } else {
             if (in_array($this->values[$i], $this->value)) {
                 $myCheckbox = new CHAW_checkbox($this->key . '_' . $i, $this->values[$i], $this->labels[$i], HAW_SELECTED);
             } else {
                 $myCheckbox = new CHAW_checkbox($this->key . '_' . $i, $this->values[$i], $this->labels[$i]);
             }
             $form->add_checkbox($myCheckbox);
             $this->checked++;
         }
         $count++;
         //              $result->MoveNext();
     }
     //          $myHidden = new CHAW_hidden($this->key . '_count', $count);
     //          $form->add_input($myHidden);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:42,代码来源:db_checklist.php

示例6: process

 function process()
 {
     if (!$this->drawnavigationbox || isset($_REQUEST['camila_xml2pdf'])) {
         $this->rows = -1;
         $this->page = 1;
     }
     if (isset($_REQUEST['camila_pagnum'])) {
         $this->page = intval($_REQUEST['camila_pagnum']);
         if ($this->page < 0) {
             $this->rows = -1;
             $this->page = 1;
             $this->inline_editing = false;
         }
         $this->offset = ($this->page - 1) * $this->rows;
     }
     if (is_array($this->stmt)) {
         $stmt = '(';
         foreach ($this->stmt as $v) {
             $stmt .= $this->condition != '' ? $v . ' where ' . $this->condition : $v;
             $stmt .= ') UNION (';
         }
         $stmt = substr($stmt, 0, strlen($stmt) - 8);
     } else {
         if (stristr($this->stmt, 'group by') === false) {
             $cong = ' and ';
             if (stristr($this->stmt, 'where') === false) {
                 $cong = ' where ';
             }
             $stmt = $this->condition != '' ? $this->stmt . $cong . $this->condition : $this->stmt;
         } else {
             $cong = ' and ';
             if (stristr($this->stmt, 'having') === false) {
                 $cong = ' having ';
             }
             $stmt = $this->condition != '' ? $this->stmt . $cong . $this->condition : $this->stmt;
             //$stmt = ($this->condition!='' ? substr( $this->stmt, 0, strpos($this->stmt, "group by")+0).' '.$cong.$this->condition.' '.substr( $this->stmt, strpos( $this->stmt, 'group by')+0) :$this->stmt);
         }
     }
     if ($this->gbyconditionpresent) {
         //$stmt .= ' group by ' . substr($_REQUEST['camila_w'.$this->totalconditions.'f'], 3);
         $stmt .= ' group by ';
         $count = 0;
         foreach ($this->gbyconditions as $key => $value) {
             if ($count > 0) {
                 $stmt .= ',' . $value;
             } else {
                 $stmt .= $value;
             }
             $count++;
         }
         //$stmt .= ' group by ' . substr($_REQUEST['camila_w'.$this->totalconditions.'f'], 3);
     }
     if ($this->orderby != '') {
         if (strpos($this->orderby, '__') !== false) {
             $this->orderby = substr($this->orderby, 0, strpos($this->orderby, '__')) . '.' . substr($this->orderby, strpos($this->orderby, '__') + 2);
         }
         $stmt = $stmt . ' order by ' . $this->orderby;
         if (!isset($_REQUEST['d'])) {
             $stmt .= ' ' . $this->direction;
         } elseif ($_REQUEST['d'] == 0) {
             $stmt .= ' asc';
             $this->direction = 'asc';
         } else {
             $stmt .= ' desc';
             $this->direction = 'desc';
         }
     }
     global $_CAMILA;
     $_CAMILA['db']->SetFetchMode(ADODB_FETCH_ASSOC);
     $result = $_CAMILA['db']->Execute($stmt);
     if ($result === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     }
     $this->numfields = $result->FieldCount();
     $this->totalrows = $result->RecordCount();
     $_CAMILA['report_record_count'] = $this->totalrows;
     if ($this->rows > 0) {
         $result = $_CAMILA['db']->SelectLimit($stmt, $this->rows, $this->offset);
     }
     //$this->totalrows = $result->RecordCount();
     $this->res = $result;
     if ($_CAMILA['db']->databaseType == 'sqlite' && count($this->tables) == 1) {
         $this->adoMetaColumns = $_CAMILA['db']->MetaColumns($this->tables[0]);
     }
     for ($i = 0; $i < $this->numfields; $i++) {
         $curr_field = $this->res->FetchField($i);
         $curr = $curr_field->name;
         $fcurr = $this->map($curr);
         $type = $this->res->MetaType($curr_field->type);
         if ($_CAMILA['db']->databaseType == 'sqlite' && count($this->tables) == 1 && $this->adoMetaColumns[strtoupper($curr_field->name)]->type != '') {
             $type = $this->res->MetaType($this->adoMetaColumns[strtoupper($curr_field->name)]->type);
         }
         reset($this->tables);
         foreach ($this->tables as $key => $value) {
             if ($this->mapping != '' && strpos($this->mapping . '=', $this->mappingseparator . $value . '.' . $curr . '=') !== false) {
                 $fcurr = $this->map($value . '.' . $curr);
                 $curr = $value . '__' . $curr;
             }
         }
         if (strpos($curr, 'cf_bool_') !== false) {
//.........这里部分代码省略.........
开发者ID:umbecr,项目名称:camilaframework,代码行数:101,代码来源:report.class.php

示例7: process

 function process()
 {
     if (isset($this->filter)) {
         $this->filter->process();
     }
     $afield = "select_{$this->table}_field";
     if (!isset($_REQUEST['camila_update']) && !isset($_REQUEST['camila_delete'])) {
         return false;
     }
     if (isset($_REQUEST['camila_update'])) {
         $this->value = unserialize(stripslashes($_REQUEST['camila_update']));
         $check = camila_token($_REQUEST['camila_update']);
     } else {
         $this->value = unserialize(stripslashes($_REQUEST['camila_delete']));
         $check = camila_token($_REQUEST['camila_delete']);
     }
     if ($check != $_REQUEST['camila_token'] && $_REQUEST['camila_update'] != 'new') {
         camila_error_page('Accesso non consentito a questa pagina');
     }
     return true;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:21,代码来源:selectform.class.php

示例8: _checkboxes

 function _checkboxes($processing)
 {
     global $_CAMILA;
     $sql2 = 'select ' . $this->bkey . ',' . $this->value_field . ' from ' . $this->intertable . ' where ' . $this->akey . '=\'' . $this->form->fields[$this->formkey]->value . '\'';
     $res2 = $_CAMILA['db']->GetAssoc($sql2);
     if ($res2 === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     }
     $_CAMILA['db']->SetFetchMode(ADODB_FETCH_ASSOC);
     $result = $_CAMILA['db']->Execute($this->query);
     if ($result === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     }
     $count = 0;
     while (!$result->EOF) {
         if (!$processing && array_key_exists($result->fields[$this->key_field], $res2) || $processing && $_REQUEST[$this->key][$result->fields[$this->key_field]] != '') {
             $this->checked++;
             if ($processing) {
                 $myCheckbox = new CHAW_input($this->key . '[' . $result->fields[$this->key_field] . ']', $_REQUEST[$this->key][$result->fields[$this->key_field]], $result->fields[$this->label_field]);
             } else {
                 $myCheckbox = new CHAW_input($this->key . '[' . $result->fields[$this->key_field] . ']', $res2[$result->fields[$this->key_field]], $result->fields[$this->label_field]);
             }
         } else {
             $myCheckbox = new CHAW_input($this->key . '[' . $result->fields[$this->key_field] . ']', '', $result->fields[$this->label_field]);
         }
         $this->checklist_values[$result->fields[$this->key_field]] = $result->fields[$this->value_field];
         $this->checklist_checkboxes[$count] = $myCheckbox;
         $count++;
         $result->MoveNext();
     }
     $this->_checkboxes_loaded = true;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:32,代码来源:intertable_int_checklist.php

示例9: validate

 function validate()
 {
     parent::validate();
     if ($this->value != '') {
         global $_CAMILA;
         $query = 'select password from ' . CAMILA_TABLE_USERS . ' where id=' . $_CAMILA['db']->Quote($_CAMILA['user_id']);
         $result = $_CAMILA['db']->Execute($query);
         if ($result === false) {
             camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
         }
         if ($result->RecordCount() == 1) {
             if ($result->fields['password'] != $_REQUEST[$this->key . '_old']) {
                 $this->form->validator->setError($this->field, 910);
             }
         } else {
             $this->form->validator->setError($this->field, 910);
         }
     }
     if ($_REQUEST[$this->key . '_confirm'] != $this->value) {
         $this->form->validator->setError($this->field, 911);
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:22,代码来源:password_change.php

示例10: operation

 function operation($id, $operation, $returl)
 {
     global $_CAMILA;
     if ($operation == 'delete') {
         require_once CAMILA_DIR . 'datagrid/form.class.php';
         require_once CAMILA_DIR . 'datagrid/elements/form/hidden.php';
         $form3 = new phpform('camila', 'cf_worktable_admin.php');
         $form3->submitbutton = camila_get_translation('camila.worktable.delete');
         $form3->drawrules = false;
         new form_hidden($form3, 'custom', $id);
         new form_hidden($form3, 'worktable_op', $operation);
         if ($returl != '') {
             new form_hidden($form3, 'returl', $returl);
         }
         if ($form3->process()) {
             $result = $_CAMILA['db']->Execute('select tablename,scriptname from ' . CAMILA_TABLE_WORKT . ' where id=' . $_CAMILA['db']->qstr($id));
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $table = $result->fields['tablename'];
             $script = $result->fields['scriptname'];
             $result = $_CAMILA['db']->Execute('delete from ' . CAMILA_TABLE_WORKT . ' where id=' . $_CAMILA['db']->qstr($id));
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $result = $_CAMILA['db']->Execute('delete from ' . CAMILA_TABLE_WORKC . ' where (wt_id=' . $_CAMILA['db']->qstr($id) . ' and is_deleted<>' . $_CAMILA['db']->qstr('y') . ')');
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $stmt = sprintf($_CAMILA['db']->_dropSeqSQL, $table);
             $result = $_CAMILA['db']->Execute($stmt);
             //if ($result === false)
             //    camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             $record = array();
             $record['visible'] = 'no';
             $record['active'] = 'no';
             $updateSQL = $_CAMILA['db']->AutoExecute(CAMILA_TABLE_PAGES, $record, 'UPDATE', 'url=' . $_CAMILA['db']->qstr($script));
             //if (!$updateSQL) {
             //    camila_information_text(camila_get_translation('camila.worktable.db.error'));
             //    $success3 = false;
             //}
         } else {
             camila_information_text(camila_get_translation('camila.worktable.delete.areyousure'));
             $result = $_CAMILA['db']->Execute('select short_title from ' . CAMILA_TABLE_WORKT . ' where id=' . $_CAMILA['db']->qstr($id));
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $name = $result->fields['short_title'];
             $myText = new CHAW_text($name, HAW_TEXTFORMAT_BOLD);
             $myText->set_br(2);
             $_CAMILA['page']->add_text($myText);
             $form3->draw();
             $success = false;
         }
     } elseif ($operation == 'rebuild') {
         require_once CAMILA_DIR . 'datagrid/form.class.php';
         require_once CAMILA_DIR . 'datagrid/elements/form/hidden.php';
         $form3 = new phpform('camila', 'cf_worktable_admin.php');
         $form3->submitbutton = camila_get_translation('camila.worktable.delete');
         $form3->drawrules = false;
         new form_hidden($form3, 'custom', $id);
         new form_hidden($form3, 'worktable_op', $operation);
         if ($returl != '') {
             new form_hidden($form3, 'returl', $returl);
         }
         if ($form3->process()) {
             $this->configure_table($id, true, $returl);
         } else {
             camila_information_text(camila_get_translation('camila.worktable.rebuild.areyousure'));
             $result = $_CAMILA['db']->Execute('select short_title from ' . CAMILA_TABLE_WORKT . ' where id=' . $_CAMILA['db']->qstr($id));
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $name = $result->fields['short_title'];
             $myText = new CHAW_text($name, HAW_TEXTFORMAT_BOLD);
             $myText->set_br(2);
             $_CAMILA['page']->add_text($myText);
             $form3->draw();
             $success = false;
         }
     } elseif ($operation == 'showtemplatefields') {
         $stmt = "select wt_id,name,name_abbrev,col_name as colname_form, col_name as colname_table from " . CAMILA_TABLE_WORKC . ' where (wt_id=' . $_CAMILA['db']->qstr($id) . ' and is_deleted<>' . $_CAMILA['db']->qstr('y') . ') order by name';
         require_once CAMILA_DIR . 'datagrid/report.class.php';
         $report = new report($stmt);
         $report->mapping = camila_get_translation('camila.worktable.mapping.worktable');
         $report->process();
         $report->fields['colname_form']->onprint = camila_configurator_template_fieldname_form;
         $report->fields['colname_form']->dummy = true;
         $report->fields['colname_form']->orderable = false;
         $report->fields['colname_table']->onprint = camila_configurator_template_fieldname_table;
         $report->fields['colname_table']->dummy = true;
         $report->fields['colname_table']->orderable = false;
         $report->fields['wt_id']->print = false;
         $report->fields['name']->orderable = false;
         $report->fields['name_abbrev']->orderable = false;
         $report->drawfilterbox = false;
         $report->drawnavigationbox = false;
         $report->draw();
     }
     if ($success) {
//.........这里部分代码省略.........
开发者ID:umbecr,项目名称:camilaframework,代码行数:101,代码来源:configurator.class.php

示例11: create_page


//.........这里部分代码省略.........
         $opt = array();
         $opt[] = camila_get_translation('camila.worktable.field.sequence');
         $opt[] = camila_get_translation('camila.worktable.field.name.abbrev');
         $opt[] = camila_get_translation('camila.worktable.field.type');
         $opt[] = camila_get_translation('camila.worktable.field.listofvalues');
         $opt[] = camila_get_translation('camila.worktable.field.maxlength');
         $opt[] = camila_get_translation('camila.worktable.field.required');
         $opt[] = camila_get_translation('camila.worktable.field.defaultval');
         $opt[] = camila_get_translation('camila.worktable.field.readonly');
         $opt[] = camila_get_translation('camila.worktable.field.visible');
         $opt[] = camila_get_translation('camila.worktable.field.force');
         $opt[] = camila_get_translation('camila.worktable.field.unique');
         $opt[] = camila_get_translation('camila.worktable.field.options');
         $opt[] = camila_get_translation('camila.worktable.field.autosuggestwtname');
         $opt[] = camila_get_translation('camila.worktable.field.autosuggestwtcolname');
         $opt[] = '';
         $opt[] = camila_get_translation('camila.worktable.configuration');
         $opt[] = camila_get_translation('camila.worktable.name');
         $opt[] = camila_get_translation('camila.worktable.desc');
         $opt[] = camila_get_translation('camila.worktable.order.by');
         $opt[] = camila_get_translation('camila.worktable.order.dir');
         $opt[] = camila_get_translation('camila.worktable.canupdate');
         $opt[] = camila_get_translation('camila.worktable.caninsert');
         $opt[] = camila_get_translation('camila.worktable.candelete');
         $opt[] = camila_get_translation('camila.worktable.category');
         foreach ($opt as $key => $value) {
             $text = $opt[$key];
             $worksheet->writeString(intval($key) + 1, $o, isUTF8($text) ? utf8_decode($text) : $text);
         }
         $worksheet->setColumn(0, 0, 30);
         $id = substr($_SERVER['PHP_SELF'], 12, -4);
         $result = $_CAMILA['db']->Execute('select * from ' . CAMILA_TABLE_WORKC . ' where (wt_id=' . $_CAMILA['db']->qstr($id) . ' and is_deleted<>' . $_CAMILA['db']->qstr('y') . ') order by sequence');
         if ($result === false) {
             camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
         }
         $yesNoArr = camila_get_translation_array('camila.worktable.options.noyes');
         $fieldTypeArr = camila_get_translation_array('camila.worktable.options.fieldtype');
         $forceArr = camila_get_translation_array('camila.worktable.options.force');
         $orderDirArr = camila_get_translation_array('camila.worktable.options.order.dir');
         $colArray = array();
         $count = 1;
         while (!$result->EOF) {
             $colArray[$result->fields['col_name']] = $result->fields['name'];
             $text = $result->fields['name'];
             $worksheet->writeString(0, $count, isUTF8($text) ? utf8_decode($text) : $text);
             if ($_REQUEST['camila_worktable_export'] == 'all' && !$dataFound) {
                 $dWorksheet->writeString(0, $count - 1, isUTF8($text) ? utf8_decode($text) : $text);
             }
             $text = $result->fields['sequence'];
             $worksheet->writeNumber(1, $count, isUTF8($text) ? utf8_decode($text) : $text, $aLeft);
             $text = $result->fields['name_abbrev'];
             $worksheet->writeString(2, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $fieldTypeArr[$result->fields['type']];
             $worksheet->writeString(3, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $result->fields['listbox_options'];
             $worksheet->writeString(4, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $result->fields['maxlength'];
             $worksheet->writeNumber(5, $count, isUTF8($text) ? utf8_decode($text) : $text, $aLeft);
             $text = $yesNoArr[$result->fields['required']];
             $worksheet->writeString(6, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $result->fields['default_value'];
             $worksheet->writeString(7, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $text = $yesNoArr[$result->fields['readonly']];
             $worksheet->writeString(8, $count, isUTF8($text) ? utf8_decode($text) : $text);
             $text = $text = $yesNoArr[$result->fields['visible']];
             $worksheet->writeString(9, $count, isUTF8($text) ? utf8_decode($text) : $text);
开发者ID:umbecr,项目名称:camilaframework,代码行数:67,代码来源:camila_xls.php

示例12: process

 function process()
 {
     if (isset($_REQUEST['camila_download']) && $_REQUEST['camila_download'] != '') {
         $this->_download($_REQUEST['camila_download']);
         exit;
     }
     if (isset($_REQUEST['camila_update']) || isset($_REQUEST['camila_delete']) || isset($_REQUEST['camila_move'])) {
         if (isset($_REQUEST['camila_update'])) {
             $this->keyvalue = unserialize(stripslashes($_REQUEST['camila_update']));
             $check = camila_token($_REQUEST['camila_update']);
         } elseif (isset($_REQUEST['camila_move'])) {
             $this->keyvalue = unserialize(stripslashes($_REQUEST['camila_move']));
             $check = camila_token($_REQUEST['camila_move']);
         } else {
             $this->keyvalue = unserialize(stripslashes($_REQUEST['camila_delete']));
             $check = camila_token($_REQUEST['camila_delete']);
         }
         if ($check != $_REQUEST['camila_token'] && $_REQUEST['camila_update'] != 'new' && $_REQUEST['camila_update'] != 'newdir') {
             camila_error_page(camila_get_translation('camila.pageforbidden'));
         }
     }
     if (!$this->drawnavigationbox) {
         $this->rows = -1;
         $this->page = 1;
     }
     if (isset($_REQUEST['camila_pagnum'])) {
         $this->page = intval($_REQUEST['camila_pagnum']);
         if ($this->page < 0) {
             $this->rows = -1;
             $this->page = 1;
         }
         $this->offset = ($this->page - 1) * $this->rows;
     }
     //$this->numfields = 5;
     $this->fields['icon'] = new report_icon('icon', '');
     $this->fields['icon']->report = $this;
     $this->fields['name'] = new report_string('name', camila_get_translation('camila.fm.nameheader'));
     $this->fields['name']->report = $this;
     $this->fields['size'] = new report_byte('size', camila_get_translation('camila.fm.sizeheader'));
     $this->fields['size']->report = $this;
     $this->fields['type'] = new report_string('type', camila_get_translation('camila.fm.typeheader'));
     $this->fields['type']->report = $this;
     $this->fields['mod'] = new report_timestamp('mod', camila_get_translation('camila.fm.lastmodifyheader'));
     $this->fields['mod']->report = $this;
     if ($this->canupdate) {
         $this->fields['camila_update'] = new report_string('camila_update', '');
         $this->fields['camila_update']->report = $this;
     }
     if ($this->canmove) {
         $this->fields['camila_move'] = new report_string('camila_move', '');
         $this->fields['camila_move']->report = $this;
     }
     if ($this->candelete) {
         $this->fields['camila_delete'] = new report_string('camila_delete', '');
         $this->fields['camila_delete']->report = $this;
     }
     $myArr = array();
     if (isset($_REQUEST['camila_dir'])) {
         $this->is_root_dir = false;
     }
     if ($this->extfsenabled) {
         if (isset($_REQUEST['camila_dir']) && $_REQUEST['camila_dir'] != '') {
             if ($_REQUEST['camila_up'] == 'yes') {
                 $ancnode = $this->_tree_get_ancestor_node($this->_tree_get_node_by_id($_REQUEST['camila_dir']));
                 if ($ancnode['usergroup'] == '') {
                     $this->is_root_dir = true;
                     $myArr = $this->_tree_get_file_subtree($this->_tree_get_group_root_node($this->usergroup), array('name'), $this->usergroup);
                 } else {
                     $this->dir_id = $ancnode['id'];
                     $myArr = $this->_tree_get_file_subtree($ancnode, array('name'), $this->usergroup);
                 }
             } else {
                 $this->dir_id = $_REQUEST['camila_dir'];
                 $myArr = $this->_tree_get_file_subtree($this->_tree_get_node_by_id($_REQUEST['camila_dir']), array('name'), $this->usergroup);
             }
         } else {
             $myArr = $this->_tree_get_file_subtree($this->_tree_get_group_root_node($this->usergroup), array('name'), $this->usergroup);
         }
     } else {
         $count = 0;
         if (is_dir($this->dir)) {
             if ($dh = opendir($this->dir)) {
                 while (($file = readdir($dh)) !== false) {
                     if ($file != '.' && $file != '..') {
                         $myArr[$count] = $file;
                     }
                     $count++;
                 }
                 closedir($dh);
             }
         }
     }
     $tot_file_size = 0;
     $num_items = 0;
     foreach (array_keys($myArr) as $k) {
         $new_item = $myArr[$k];
         if ($new_item != '..') {
             //$abs_new_item = get_abs_item($usergroup, $new_item);
             $abs_new_item = $this->dir . '/' . $new_item;
             $new_file_size = filesize($abs_new_item);
//.........这里部分代码省略.........
开发者ID:umbecr,项目名称:camilaframework,代码行数:101,代码来源:fs_report.class.php

示例13: HAW_text

                    if ($result['result'] == 2)
                        $text = new HAW_text($file . ' - inserted: ' . $result['processed']);
                    else
                        $text = new HAW_text($file . ' - error: ' . $result['error'] . ', failed: ' . $result['failed'] . ', inserted: ' . $result['processed'], HAW_TEXTFORMAT_BOLD);
                    $page->add_text($text);
                }
    
            }
            closedir($dh);
    
        }*/
    foreach ($files as $file) {
        if ($file != '.' && $file != '..' && substr($file, -3) == 'xls') {
            $result = XLS_import2(CAMILA_TABLES_DIR . '/xls/' . $_REQUEST['lang'] . '/' . $file, CAMILA_APPLICATION_PREFIX . substr($file, 0, -4), $db);
            if ($result['result'] == 2) {
                $text = new HAW_text($file . ' - inserted: ' . $result['processed']);
            } else {
                $text = new HAW_text($file . ' - error: ' . $result['error'] . ', failed: ' . $result['failed'] . ', inserted: ' . $result['processed'], HAW_TEXTFORMAT_BOLD);
            }
            $page->add_text($text);
        }
    }
    $res = $db->Execute('update ' . CAMILA_TABLE_PLANG . ' set full_title=short_title where page_url LIKE ' . $db->qstr('cf_app.php?cat%') . ' and lang=' . $db->qstr($_REQUEST['lang']));
    if ($res === false) {
        camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $db->ErrorMsg());
    }
}
camila_delete_files(CAMILA_TMP_DIR);
$myLink = new HAW_link($_REQUEST['msg'], 'index.php');
$page->add_link($myLink);
$page->create_page();
开发者ID:umbecr,项目名称:camilaframework,代码行数:31,代码来源:cf_reset.php

示例14: _tree_get_group_root_node

 function _tree_get_group_root_node($usergroup)
 {
     $noderes['l'] = 0;
     $noderes['r'] = 0;
     global $_CAMILA;
     $_CAMILA['db']->SetFetchMode(ADODB_FETCH_ASSOC);
     $res = $_CAMILA['db']->Execute('SELECT * FROM ' . CAMILA_TABLE_FILES . ' WHERE name = ? AND usergroup = ?', array($usergroup, ''));
     if ($res === false) {
         camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
     } else {
         if (!$res->EOF) {
             $row = $res->fields;
             $noderes['id'] = $row['id'];
             $noderes['l'] = $row['lft'];
             $noderes['r'] = $row['rgt'];
         }
     }
     return $noderes;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:19,代码来源:filebox.php

示例15: process

 function process()
 {
     if (isset($_POST[$this->key])) {
         $this->value = $_POST[$this->key];
         if ($_POST["noproc_{$this->field}"] == 1) {
             $this->form->noproc = true;
             $stmt = "select {$this->fields_from} from {$this->table} where {$this->lbkey}='" . addslashes($this->value) . "'";
             global $_CAMILA;
             $_CAMILA['db']->SetFetchMode(ADODB_FETCH_NUM);
             $result = $_CAMILA['db']->Execute($query);
             if ($result === false) {
                 camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $_CAMILA['db']->ErrorMsg());
             }
             $tok = strtok($this->fields_to, ',');
             $i = 0;
             while ($tok) {
                 $this->form->fields[$tok]->value = $result->fields[$i++];
                 $this->form->fields[$tok]->process = false;
                 $tok = strtok(',');
             }
         }
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:23,代码来源:db_listbox.php


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