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


PHP txt函数代码示例

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


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

示例1: __construct

 function __construct()
 {
     $this->protocol_name = txt('home_local_folder');
     $this->errorHandler = array();
     $this->prefix = 'home';
     global $my_user;
     $dir_hash = $my_user->get_home_dir_hash();
     $home_dir = PHPOS_HOME_DIR . $dir_hash;
     if (is_dir($home_dir)) {
         $this->root_directory_id = $home_dir;
     }
     /*
     if($my_user->get_user_type() == 3)
     {
     	$this->root_directory_id = PHPOS_WEBROOT_DIR.'home';
     }		
     */
     if (empty($this->directory_id)) {
         if (is_dir($this->root_directory_id)) {
             $this->directory_id = $this->root_directory_id;
         }
     }
     if (empty($this->directory_id) || empty($this->root_directory_id)) {
         $this->errorHandler = 1;
     }
 }
开发者ID:brian-clemont,项目名称:phpos,代码行数:26,代码来源:fs.local_filesPlugin.php

示例2: phpos_shared

<?php

/*
**********************************

	PHPOS Web Operating system
	MIT License
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
if (form_submit('share_folder')) {
    $shared = new phpos_shared();
    if (globalconfig('demo_mode') != 1 || is_root()) {
        $shared->share_folder($_POST['new_folder_name'], $_POST['new_folder_desc'], 'local_files', $shared_id, $_POST['new_folder_readonly']);
    }
    msg::ok(txt('shared'));
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:24,代码来源:action_share.php

示例3:

<?php

/*
**********************************

	PHPOS Web Operating system
	MIT License
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
echo $layout->title(txt('cp_system_info_php_title'), 'icon.png');
echo $layout->txtdesc(txt('cp_system_info_php_desc'));
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
echo $phpinfo;
开发者ID:brian-clemont,项目名称:phpos,代码行数:24,代码来源:section.system_info_php.php

示例4: plaintext

function plaintext()
{
    header('Content-Type: text/plain; charset=utf-8');
    return txt("Hello, World!");
}
开发者ID:PermeAgility,项目名称:FrameworkBenchmarks,代码行数:5,代码来源:index.php

示例5: array

<?php

/*
**********************************

	PHPOS Web Operating system
	MIT License
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
$app_menu = array('title:' . txt('plugins') . ',action:actionNewFolder,icon:icon-application', array('title:Lightbox,action:actionNewFolder'), 'title:' . txt('new_folder') . ',action:actionNewFolder,icon:icon-folder_files');
function actionNewFolder($menu_item)
{
    $j = 'newfolder();';
    return $j;
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:23,代码来源:indexMenu.php

示例6: phpos_forms

	PHPOS Web Operating system
	MIT License
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
echo $layout->title(txt('cp_system_info_server_title'), 'icon.png');
echo $layout->txtdesc(txt('cp_system_info_server_desc'));
$form = new phpos_forms();
echo $form->form_start('sysinfo', helper_ajax(''), array('app_params' => ''));
echo $layout->column('50%');
$form->title(txt('cp_system_info_server_form_basic_title'), null, ICONS . 'system_info/server_icon.png');
$form->label(txt('cp_system_info_server_form_ip_title'), $_SERVER['SERVER_ADDR'], '');
$form->label(txt('cp_system_info_server_form_os_title'), PHP_OS, '');
$form->label(txt('cp_system_info_server_form_name_title'), $_SERVER['SERVER_NAME'], '');
$form->label(txt('cp_system_info_server_form_soft_title'), $_SERVER['SERVER_SOFTWARE'], '');
$form->label(txt('cp_system_info_server_form_protocol_title'), $_SERVER['SERVER_PROTOCOL'], '');
echo $form->render();
echo $layout->end('column');
echo $layout->column('50%');
echo $form->render();
echo $layout->end('column');
echo $layout->clr();
echo $form->form_end();
开发者ID:brian-clemont,项目名称:phpos,代码行数:30,代码来源:section.system_info_server.php

示例7: txt

                if ($month_number != $my_app->get_param('month_id')) {
                    $month_closed = ',state:\'closed\'';
                }
                $month_translated = txt('month_' . intval($month_number));
                echo '<li data-options="iconCls:\'icon-folder\'' . $month_closed . '">
				<span><a href="javascript:void(0);" onclick="' . helper_reload(array('year_id' => $year_number, 'month_id' => $month_number, 'day_id' => null, 'log_id' => null)) . '"><span style="color:black">' . $month_translated . '</span></a></span>';
                $dir_days = glob($logs_dir . $year_number . '/' . $month_number . '/*.*');
                echo '<ul>';
                foreach ($dir_days as $day) {
                    if (!is_dir($day) && basename($day) != 'index.php') {
                        $days[] = basename($day);
                        $log_ext = '.log';
                        $day_id = str_replace(array('-', $year_number, $month_number, $log_ext), '', basename($day));
                        $today = '';
                        if ($logs->is_today_date($year_number, $month_number, $day_id)) {
                            $today = ' <span style="font-weight:bold; color: #1d791e">(' . txt('today') . ')</span>';
                        }
                        if ($my_app->get_param('log_id') == $day) {
                            $day_id = '<b>' . $day_id . '</b>';
                        }
                        echo '<li data-options="iconCls:\'icon-file\'">
				<span><a href="javascript:void(0);" onclick="' . helper_reload(array('year_id' => $year_number, 'month_id' => $month_number, 'day_id' => $day_id, 'log_id' => $day)) . '"><span style="color:black">' . $day_id . $today . '</span></a></span></li>';
                    }
                }
                echo '</ul>';
                echo '</li>';
            }
            echo '</ul>';
        }
        echo '</li>';
    }
开发者ID:brian-clemont,项目名称:phpos,代码行数:31,代码来源:section.logs.php

示例8: count

            $k = count($users_in_group);
            if ($k != 0) {
                foreach ($users_in_group as $grp_user) {
                    $usr_data = new phpos_users();
                    $usr_data->set_id_user($grp_user['id_user']);
                    $usr_data->get_user_by_id();
                    $right_item['name'] = $usr_data->get_user_login();
                    $right_item['onclick'] = link_action('shared', 'workgroup_id:' . $workgroup_id . ',workgroup_user_id:' . $grp_user['id_user'] . ',fs:local_files');
                    $right_item['icon'] = 'user.png';
                    $right_item['marked'] = false;
                    if ($shared_id_user == $grp_user['id_user']) {
                        $right_item['marked'] = true;
                    }
                    $explorer_right_items[] = $right_item;
                }
            }
            /* ================================================== */
        } else {
            $html['icons'] = $layout->area_start(txt('shared_error')) . $layout->txtdesc(txt('st_shared')) . txt('shared_not_exists') . $layout->area_end();
        }
        /* ================================================== */
    } else {
        $tmp_html = '';
        include PHPOS_DIR . 'plugins/server.explorer_shared.php';
        $html['icons'] .= $layout->area_start($server_item_title) . $layout->txtdesc(txt('st_shared')) . $tmp_html . $layout->area_end();
        $tmp_html = '';
    }
}
if (defined('SHARED') || $my_app->get_param('in_shared')) {
    $address_icon = ICONS . 'server/shared1.png';
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:31,代码来源:explorer_shared.php

示例9: txt

?>

<?php 
function txt($filename)
{
    $txt = file_get_contents("data/{$filename}.txt");
    echo $txt;
}
?>

<?php 
txt('textbeispiel');
?>

<?php 
txt('about');
?>


<?php 
echo $data['site_name'];
?>


<h3>Menu</h3>

<?php 
foreach ($data['mainmenu'] as $menu) {
    echo "<li>" . "<a href='" . $menu['url'] . "'>" . $menu['item'] . "</a></li>";
}
?>
开发者ID:fritzbenning,项目名称:pixelorbit,代码行数:31,代码来源:experiments.php

示例10: phpos_shortcuts

$link_id = $my_app->get_param('link_id');
if (!empty($link_id)) {
    $wincfg['back'] = null;
    $shortcut = new phpos_shortcuts();
    $db_shortcut = $shortcut->get_shortcut($link_id);
    $db_params = $shortcut->get_params_from_db($link_id);
    $url = base64_decode($db_params['url']);
    $start_link_title = $db_shortcut['file_title'];
    $button = txt('shortcuts_window_btn_update_url');
    $wincfg['title'] = txt('shortcuts_window_title_update_url');
}
$form->status();
$form->condition('not_null', true, txt('name_empty'));
$form->input('text', 'new_link_name', txt('shortcuts_form_icon_name'), txt('shortcuts_form_icon_name_desc'), $start_link_title);
$form->condition('not_null', true, txt('url_empty'));
$form->input('text', 'new_link_url', txt('shortcuts_url_form_url'), txt('shortcuts_url_form_url_desc'), $url);
$icons = new phpos_icons();
$c = $icons->count_icons();
$items = array('null' => '---');
if ($c != 0) {
    $icons_list = $icons->get_icon_list();
    foreach ($icons_list as $icon_name) {
        $items[$icon_name] = $icon_name;
    }
}
$form->title(txt('shortcuts_icon_for_title'), '', MY_RESOURCES . 'icon.png');
$form->select('new_link_icon', txt('shortcuts_icon_for_name'), txt('shortcuts_icon_for_desc'), $items, $db_shortcut['icon']);
$html .= $form->render();
$form->submit_btn($button);
$next_button = $form->render();
$html .= $form->form_end();
开发者ID:brian-clemont,项目名称:phpos,代码行数:31,代码来源:shortcuts_link.php

示例11: update_time_left

function update_time_left()
{
    global $api;
    $item_id = params('item_id');
    $state = $_POST['state'];
    $data = array(array('value' => $state));
    $api->item->updateFieldValue($item_id, ITEM_STATE_ID, $data);
    // Set time_left to '0' when moving to one of the 'done' states
    if (in_array($state, array(STATE_DEV_DONE, STATE_QA_DONE, STATE_PO_DONE))) {
        $api->item->updateFieldValue($item_id, ITEM_TIMELEFT_ID, array(array('value' => 0)), 1);
    } elseif ($state == STATE_NOT_STARTED) {
        $item = $api->item->getBasic($item_id);
        $item = new ScrumioItem($item);
        $api->item->updateFieldValue($item_id, ITEM_TIMELEFT_ID, array(array('value' => $item->estimate * 60 * 60)), 1);
    }
    return txt('ok');
}
开发者ID:haugstrup,项目名称:sample-scrumboard,代码行数:17,代码来源:index.php

示例12: Evaluation

function Evaluation($id, $value, $input, $exercise_id, $operatorData, $answer)
{
    $m = new EvalMath();
    $xml = simplexml_load_file($exercise_id) or die("Error: Cannot create object");
    // $ops = array("==", "!=", "GE", "LE", "GT", "LT");
    $count_options = $xml->input[$id]->count();
    for ($i = 0; $i < $count_options; $i++) {
        $operator = $xml->input[$id]->option[$i]->operator;
        $equation = trim($xml->input[$id]->option[$i]->equation);
        $data = explode(" ", $equation);
        $operatorDT = "";
        if ($operator == 'IF') {
            if (strstr($equation, "and")) {
                $content = explode("and", $equation);
                $data1 = explode(" ", $content[0]);
                $data2 = explode(" ", $content[1]);
                if (evalStatement($data1, $input, $answer) and evalStatement($data2, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            } elseif (strstr($equation, "or")) {
                $content = explode("or", $equation);
                $data1 = explode(" ", $content[0]);
                $data2 = explode(" ", $content[1]);
                if (evalStatement($data1, $input, $answer) or evalStatement($data2, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            } else {
                if (evalStatement($data, $input, $answer)) {
                    return $xml->input[$id]->option[$i]->result;
                }
            }
        } else {
            $equation = "";
            foreach ($data as $element) {
                if (is_numeric($element)) {
                    $equation .= $element;
                } else {
                    if ($element[0] == 'o') {
                        $operatorDT = ltrim($element, "o");
                    } elseif ($element[0] == 'v') {
                        $trimmed = intval(ltrim($element, "v"));
                        $equation .= $input[$trimmed];
                    } elseif ($element[0] == 'a') {
                        $trimmed = intval(ltrim($element, "a"));
                        $equation .= $answer[$trimmed - 1];
                    } else {
                        $equation .= $element;
                    }
                }
            }
            if (strstr($equation, "mcm")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = mcm(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "smn")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = smn(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "smd")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = smd(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "cod")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = cod(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "red")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = red(intval($valor[0]), intval($valor[1]));
            } elseif (strstr($equation, "txt")) {
                $valor = explode(",", substr($equation, 3));
                $equation_result = txt($valor[0], $valor[1]);
            } else {
                $equation_result = $m->evaluate($equation);
            }
            if ($operatorDT == "") {
                $operatorData = "";
            }
            // return strval($equation_result);
            switch ($operator) {
                case "==":
                    if ($equation_result == $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "!=":
                    if ($equation_result != $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "GT":
                    if ($equation_result > $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
                case "GE":
                    if ($equation_result >= $value && $operatorDT == $operatorData) {
                        return $xml->input[$id]->option[$i]->result;
                        $i = $count_options;
                    }
                    break;
//.........这里部分代码省略.........
开发者ID:axomar,项目名称:ITS,代码行数:101,代码来源:solEval.php

示例13: phpos_languages

        $languages = new phpos_languages();
        $langs_array = $languages->get_lang_list();
        $lang_items = array();
        foreach ($langs_array as $lang_id) {
            $lang_data = $languages->get_lang_info($lang_id);
            $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')';
            $lang_items[$lang_id] = $lang_name;
        }
        $new_cfg = new phpos_config('no_get');
        $new_cfg->set_id_user($user_id);
        $lang = $new_cfg->get_user('lang');
        $form->select('user_new_lang', txt('language'), txt('dsc_users_account_lang'), $lang_items, $lang);
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $user_id . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
        // user info
        echo $layout->area_start();
        include MY_APP_DIR . 'views/inc.account_info.php';
        echo $layout->area_end();
    } else {
        echo txt('access_denied');
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:31,代码来源:section.edit_account.php

示例14: phpos_groups

            $users_in_group = $group->get_users_in_group();
            $groups = new phpos_groups();
            $groups_records = $groups->get_my_groups();
            $k = count($users_in_group);
            if ($k != 0) {
                foreach ($groups_records as $group_row) {
                    $right_item['name'] = $group_row['title'];
                    $right_item['onclick'] = link_action('workgroup', 'shared_id:0,workgroup_id:' . $group_row['id'] . ',fs:ftp');
                    $right_item['icon'] = 'workgroup.png';
                    $right_item['marked'] = false;
                    if ($shared_id_user == $grp_user['id_user']) {
                        $right_item['marked'] = true;
                    }
                    $explorer_right_items[] = $right_item;
                }
            }
            /* ================================================== */
        } else {
            $html['icons'] = $layout->area_start(txt('group_error')) . txt('group_not_exists') . $layout->area_end();
        }
        /* ================================================== */
    } else {
        $tmp_html = '';
        include PHPOS_DIR . 'plugins/server.explorer_workgroups.php';
        $html['icons'] .= $layout->area_start($server_item_title) . $layout->txtdesc(txt('groups_serv_desc')) . $tmp_html . $layout->area_end();
        $tmp_html = '';
        $html['right_items_title'] = txt('explorer_right_groups');
        $html['right_items_desc'] = txt('explorer_right_groups_desc');
        $html['right_items_img'] = 'workgroup.png';
    }
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:31,代码来源:explorer_workgroup.php

示例15: actionGoInfo

function actionGoInfo($menu_item)
{
    $j = winopen(txt('sys_info'), 'cp', 'app_id:system_info@index');
    return $j;
}
开发者ID:brian-clemont,项目名称:phpos,代码行数:5,代码来源:my_serverMenu.php


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