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


PHP camila_get_translation函数代码示例

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


在下文中一共展示了camila_get_translation函数的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: draw

 function draw(&$form)
 {
     parent::draw($form);
     if ($this->updatable) {
         if ($this->maxlength > 0) {
             global $_CAMILA;
             $code = '<script type="text/javascript" src="' . CAMILA_LIB_DIR . 'ylib/ylib.js"></script>';
             $code .= '<script type="text/javascript" src="' . CAMILA_LIB_DIR . 'ylib/y_util.js"></script>';
             $code .= '<script type="text/javascript" src="' . CAMILA_LIB_DIR . 'ylib/y_TextCounter.js"></script>';
             $_CAMILA['page']->camila_add_js($code, 'textcounter');
             $code = "<script> camila_addDOMLoadEvent ( function(){";
             $code .= ' var camila_counter = new ylib.widget.TextCounter("' . $this->key . '", ' . $this->maxlength . ', "' . camila_get_translation('camila.form.presmscharleft') . ' ","' . camila_get_translation('camila.form.postsmscharleft') . '");';
             $code .= "} );</script>";
             $_CAMILA['page']->camila_add_js($code);
             $code = "<script>document.write('<div>');</script>";
             $js = new CHAW_js($code);
             $form->add_userdefined($js);
         }
         $myTextarea = new CHAW_textarea($this->key, $this->value, $this->title . $this->labelseparator, $this->rows, $this->cols);
         $form->add_textarea($myTextarea);
         if ($this->maxlength > 0) {
             $js = new CHAW_js("<script>document.write('</div>')</script>");
             $form->add_userdefined($js);
         }
     } else {
         $myText = new CHAW_text($this->title . $this->labelseparator . ' ' . $this->value);
         $form->add_text($myText);
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:29,代码来源:textarea.php

示例4: draw

 function draw(&$row, $fields)
 {
     global $_CAMILA;
     $formula = $this->report->queries[$this->field];
     $wTable = substr($formula, 0, strpos($formula, ','));
     $field = substr($formula, strlen($wTable) + 1);
     $query = substr($field, strpos($field, ',') + 1);
     $field = substr($field, 0, strpos($field, ','));
     $url = camila_worktable_get_table_id($wTable);
     $ttemp = new MiniTemplator();
     $ttemp->setTemplateString($query);
     foreach ($fields as $key) {
         if ($key->value != '') {
             $ttemp->setVariable($key->title, $key->value, true);
         } else {
             $ttemp->setVariable($key->title, '0', true);
         }
     }
     $ttemp->generateOutputToString($query);
     if ($field == camila_get_translation('camila.worktable.query.count')) {
         $fields = array('camila_session_id' => $_REQUEST['PHPSESSID'], 'camila_xml' => '', 'filter' => $query, 'camila_export_no_table_data' => 'y');
         $this->value = str_replace(array("\r", "\r\n", "\n"), '', strip_tags($this->httpGet($_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], '/' . CAMILA_APP_DIR . '/' . $url, $fields, array('PHPSESSID2' => $_REQUEST['PHPSESSID']))));
     } else {
         $this->value = camila_get_translation('camila.worktable.query.count') . ' not yet supported :-(';
     }
     parent::draw($row, $fields);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:27,代码来源:query.php

示例5: _get_select

 function _get_select()
 {
     $mySelect = new CHAW_select($this->key);
     $node = $this->fs->_tree_get_group_root_node($this->usergroup);
     $attributes = array('name');
     $wlk = $this->fs->_tree_walk_preorder($node);
     while ($curr = $this->fs->_tree_walk_next($wlk)) {
         $level = $this->fs->_tree_walk_level($wlk);
         $spaces = str_repeat('--', $level - 1);
         $att = reset($attributes);
         while ($att) {
             if ($level == 0) {
                 $mySelect->add_option('(' . camila_get_translation('camila.fm.selectfolder') . ')', $wlk['row']['id']);
             } elseif ($wlk['row']['file'] == '') {
                 if ($wlk['row']['id'] == $_REQUEST['camila_dir']) {
                     $mySelect->add_option($spaces . $wlk['row'][$att], $wlk['row']['id'], HAW_SELECTED);
                 } else {
                     $mySelect->add_option($spaces . $wlk['row'][$att], $wlk['row']['id']);
                 }
             }
             $att = next($attributes);
         }
     }
     return $mySelect;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:25,代码来源:fm_dir_listbox.php

示例6: 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

示例7: 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

示例8: draw

 function draw(&$row, $fields)
 {
     $size = $this->value;
     if ($size >= 1073741824) {
         $size = round($size / 1073741824 * 100) / 100 . ' GB';
     } elseif ($size >= 1048576) {
         $size = round($size / 1048576 * 100) / 100 . ' MB';
     } elseif ($size >= 1024) {
         $size = round($size / 1024 * 100) / 100 . ' KB';
     } else {
         $size = $size . ' B';
     }
     if ($size == 0) {
         $size = '-';
     }
     $this->value = str_replace('.', camila_get_translation('camila.decimal.separator'), $size);
     parent::draw($row, $fields);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:18,代码来源:byte.php

示例9: camila_export_action_select

function camila_export_action_select()
{
    global $_CAMILA;
    $mySelect = new CHAW_select('camila_export_action');
    require_once 'fs.class.php';
    $fs = new fs($_CAMILA['adm_user_group']);
    $mySelect->add_option(camila_get_translation('camila.export.download'), 'download');
    if (!CAMILA_FM_EXTFS_ENABLED) {
        if (!CAMILA_FM_EXPORT_SAVETO_DISABLED) {
            $mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents'), '/', $_REQUEST['camila_export_last_action'] == '/' ? HAW_SELECTED : HAW_NOTSELECTED);
            $arr = $fs->scandir(CAMILA_FM_ROOTDIR, true, false);
            sort($arr);
            foreach ($arr as $value) {
                $item = substr($value, strlen(CAMILA_FM_ROOTDIR) + 1);
                if ($item != camila_get_translation('camila.documents.recyclebin')) {
                    if ('/' . $item == $_REQUEST['camila_export_last_action']) {
                        $mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $item, '/' . $item, HAW_SELECTED);
                    } else {
                        $mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $item, '/' . $item);
                    }
                }
            }
        }
    } else {
        $node = $fs->_tree_get_group_root_node($_CAMILA['adm_user_group']);
        $attributes = array('name');
        $wlk = $fs->_tree_walk_preorder($node);
        while ($curr = $fs->_tree_walk_next($wlk)) {
            $level = $fs->_tree_walk_level($wlk);
            $spaces = str_repeat('--', $level - 1);
            $att = reset($attributes);
            while ($att) {
                if ($level == 0) {
                    $mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents'), $wlk['row']['id']);
                } elseif ($wlk['row']['file'] == '') {
                    $mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $spaces . $wlk['row'][$att], $wlk['row']['id']);
                }
                $att = next($attributes);
            }
        }
    }
    return $mySelect;
}
开发者ID:umbecr,项目名称:camilaframework,代码行数:43,代码来源:export.php

示例10: 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

示例11: 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);
     }
     if (count($this->labels) > 1) {
         $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;
     $count = 0;
     foreach ($this->values as $key => $value) {
         $myHidden = new CHAW_hidden($this->key . '_labels_' . $count, $this->labels[$count]);
         $form->add_input($myHidden);
         if ($this->values[$count] == '') {
             $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[$count]);
             $form->add_text($text);
         } else {
             if (in_array($fields[$count], $this->value)) {
                 $myCheckbox = new CHAW_checkbox($this->key . '_' . $count, $this->values[$count], $this->labels[$count], HAW_SELECTED);
             } else {
                 $myCheckbox = new CHAW_checkbox($this->key . '_' . $count, $this->values[$count], $this->labels[$count]);
             }
             if (($count + 1) % $this->cols != 0 && count($this->labels) > 1) {
                 $myCheckbox->set_br(0);
             }
             $form->add_checkbox($myCheckbox);
             $this->checked++;
         }
         $count++;
     }
     //          $myHidden = new CHAW_hidden($this->key . '_count', $count);
     //          $form->add_input($myHidden);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:40,代码来源:checklist.php

示例12: closedir

            closedir($dh2);
        }
    }
}
if (isset($_REQUEST['output']) && $_REQUEST['output'] != '') {
    $o = new CHAW_hidden('output', $_REQUEST['output']);
    $myForm->add_hidden($o);
}
$thePW4 = new CHAW_hidden('js', '');
$myForm->add_hidden($thePW4);
$code = "<script>document.forms[0].js.value = 'enabled';</script>";
$js = new CHAW_js($code, true);
$myForm->add_userdefined($js);
$myForm->add_raw($myParOpen);
$theSubmission = new CHAW_submit(camila_get_translation('camila.login.enter'), 'submit');
$myForm->add_submit($theSubmission);
$myForm->add_raw($myParClose);
if (!CAMILA_PRIVATE_SERVER) {
    $myHtmlCode = "<div class='camilaopenidlogin'><a href='cf_login_openid.php?action=verify&openid_identifier=https%3a%2f%2fwww.google.com%2faccounts%2fo8%2fid'>" . camila_get_translation('camila.login.openid.google') . "</a><br /></div>";
    $myGmailLoginBlock = new HAW_raw(HAW_HTML, $myHtmlCode);
    $myForm->add_raw($myGmailLoginBlock);
}
if ($_CAMILA['auth_failed']) {
    $text = new CHAW_text(camila_get_translation('camila.login.wrongpassword'));
    $myForm->add_text($text);
}
$_CAMILA['page']->add_form($myForm);
$myDivClose = new HAW_raw(HAW_HTML, '</div>');
$_CAMILA['page']->add_raw($myDivClose);
$myLogin = new CHAW_storepwd();
$_CAMILA['page']->add_userdefined($myLogin);
开发者ID:umbecr,项目名称:camilaframework,代码行数:31,代码来源:login_nojs.php

示例13: Copyright

<?php

/* This File is part of Camila PHP Framework
   Copyright (C) 2006-2009 Umberto Bresciani

   Camila PHP Framework is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   Camila PHP Framework is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with Camila PHP Framework; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
require '../camila/header.php';
camila_save_preferences();
$text = new CHAW_text(camila_get_translation('camila.manualredirect'), HAW_TEXTFORMAT_ITALIC);
$_CAMILA['page']->add_text($text);
$myLink = new CHAW_link(camila_get_translation('camila.clickhere'), $_REQUEST['camila_redirect']);
$_CAMILA['page']->add_link($myLink);
$_CAMILA['page']->set_redirection(0.1, $_REQUEST['camila_redirect']);
$_CAMILA['page']->create_page();
require '../camila/footer.php';
开发者ID:umbecr,项目名称:camilaframework,代码行数:27,代码来源:cf_redirect.php

示例14: XLS_import2

function XLS_import2($file, $table, $db)
{
    $filename = basename($file);
    $sequence = intval(substr($filename, 0, strpos($filename, '_')));
    $res = $db->Execute('select id from ' . CAMILA_TABLE_WORKT . ' where filename=' . $db->qstr($filename));
    if ($res === false) {
        camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $db->ErrorMsg());
    }
    $id = $res->fields['id'];
    $result = array();
    $configurator = new configurator();
    $configurator->filename = $file;
    $configurator->sheetnum = 0;
    $configurator->interactive = false;
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    $configurator->db = $db;
    $configurator->configure_table($id, false);
    $record = array();
    $res = $db->Execute('select * from ' . CAMILA_TABLE_WORKT . ' where id=' . $db->qstr($id));
    if ($res === false) {
        camila_error_page(camila_get_translation('camila.sqlerror') . ' ' . $db->ErrorMsg());
    }
    $record['short_title'] = $res->fields['short_title'];
    $record['full_title'] = $res->fields['full_title'];
    $record['label_order'] = $sequence;
    $scriptname = $res->fields['scriptname'];
    $category = $res->fields['category'];
    $updateSQL = $db->AutoExecute(CAMILA_TABLE_PLANG, $record, 'UPDATE', 'page_url=' . $db->qstr($scriptname) . ' and lang=' . $db->qstr($_REQUEST['lang']));
    if (!$updateSQL) {
        camila_information_text(camila_get_translation('camila.worktable.db.error'));
    }
    if (trim($category) != '') {
        $res = $db->Execute('select page_url from ' . CAMILA_TABLE_PLANG . ' where short_title=' . $db->qstr($category) . ' AND 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());
        }
        $cat_url = '-';
        if ($res->RecordCount() == 0) {
            $res = $db->Execute('select page_url from ' . CAMILA_TABLE_PLANG . ' where full_title<>' . $db->qstr('-') . ' AND 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());
            }
            $cat_url = $res->fields['page_url'];
            $record = array();
            $record['label_order'] = $sequence;
            $record['short_title'] = $category;
            $record['full_title'] = '-';
            $updateSQL = $db->AutoExecute(CAMILA_TABLE_PLANG, $record, 'UPDATE', 'page_url=' . $db->qstr($cat_url) . ' and lang=' . $db->qstr($_REQUEST['lang']));
            if (!$updateSQL) {
                camila_information_text(camila_get_translation('camila.worktable.db.error'));
            }
        } else {
            $cat_url = $res->fields['page_url'];
        }
        $record = array();
        $record['parent'] = $cat_url;
        $updateSQL = $db->AutoExecute(CAMILA_TABLE_PAGES, $record, 'UPDATE', 'url=' . $db->qstr($scriptname));
        if (!$updateSQL) {
            camila_information_text(camila_get_translation('camila.worktable.db.error'));
        }
        $record = array();
        $record['visible'] = 'yes';
        $updateSQL = $db->AutoExecute(CAMILA_TABLE_PAGES, $record, 'UPDATE', 'url=' . $db->qstr($cat_url));
        if (!$updateSQL) {
            camila_information_text(camila_get_translation('camila.worktable.db.error'));
        }
    }
    $result['result'] = 2;
    //success
    $result['processed'] = 1;
    $result['failed'] = 0;
    return $result;
}
开发者ID:umbecr,项目名称:camilaframework,代码行数:73,代码来源:import.inc.php

示例15: close

 /**
  * Add the tag to the footer or header elements.
  *
  * @return void 
  */
 public function close()
 {
     $this->pdf->AliasNbPages();
     $this->content = camila_get_translation('camila.report.navbox.page') . ' %s/{nb}';
     $this->parent->elements[] = $this;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:11,代码来源:xml2pdf.tag.numerotation.php


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