本文整理汇总了PHP中zotop::t方法的典型用法代码示例。如果您正苦于以下问题:PHP zotop::t方法的具体用法?PHP zotop::t怎么用?PHP zotop::t使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zotop
的用法示例。
在下文中一共展示了zotop::t方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = array())
{
if (!$this->test()) {
zotop::error(zotop::t('The memcache extension is not available'));
}
$host = $config['host'];
$host = empty($host) ? zotop::config('system.cache.memcache.host') : $host;
$host = empty($host) ? '127.0.0.1' : $host;
$post = $config['post'];
$port = empty($port) ? zotop::config('system.cache.memcache.port') : $port;
$port = empty($port) ? '11211' : $port;
$timeout = isset($config['timeout']) ? (bool) $config['timeout'] : false;
$persistent = isset($config['persistent']) ? (bool) $config['persistent'] : false;
unset($config);
//是否持久链接
$connect = $persistent ? 'pconnect' : 'connect';
$this->memcache =& new Memcache();
if ($timeout === false) {
$this->connected = @$this->memcache->{$connect}($host, $port);
} else {
$this->connected = @$this->memcache->{$connect}($host, $port, $timeout);
}
if (!$this->connected) {
zotop::error(zotop::t('无法连接memcache服务器 “{$host}:{$port}”,请检查参数配置是否正确', array('host' => $host, 'port' => $port)));
}
}
示例2: onDefault
public function onDefault()
{
if (form::isPostBack()) {
msg::error('开发中', '数据保存开发中,请稍后……');
}
$header['title'] = '系统设置';
page::header($header);
page::top();
page::navbar($this->navbar(), 'main');
form::header();
block::header('网站基本信息');
form::field(array('type' => 'text', 'label' => zotop::t('网站名称'), 'name' => 'zotop.site.title', 'value' => zotop::config('zotop.site.title'), 'description' => zotop::t('网站名称,将显示在标题和导航中')));
form::field(array('type' => 'text', 'label' => zotop::t('网站域名'), 'name' => 'zotop.site.domain', 'value' => zotop::config('zotop.site.domain'), 'description' => zotop::t('网站域名地址,不包含http://,如:www.zotop.com')));
form::field(array('type' => 'text', 'label' => zotop::t('备案信息'), 'name' => 'zotop.site.icp', 'value' => zotop::config('zotop.site.icp'), 'description' => zotop::t('页面底部可以显示 ICP 备案信息,如果网站已备案,在此输入您的授权码,它将显示在页面底部,如果没有请留空')));
form::field(array('type' => 'select', 'options' => array('0' => '不显示', '1' => '显示'), 'label' => zotop::t('授权信息'), 'name' => 'zotop.site.license', 'value' => zotop::config('zotop.site.license'), 'description' => zotop::t('页脚部位显示程序官方网站链接')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => zotop::config('zotop.site.about')));
block::footer();
block::header('联系信息设置');
form::field(array('type' => 'text', 'label' => zotop::t('公司名称'), 'name' => 'zotop.site.title', 'value' => '', 'description' => zotop::t('网站隶属的公司或者组织名称')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => ''));
block::footer();
form::buttons(array('type' => 'submit'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例3: actionIndex
public function actionIndex($parentid = 0)
{
$folder = zotop::model('system.folder');
if (form::isPostBack()) {
$post = form::post();
foreach ((array) $post['id'] as $i => $id) {
$folder->update(array('order' => $i + 1), $id);
}
if (!$folder->error()) {
msg::success('保存成功', zotop::url('system/folder/index'));
}
msg::error($folder->msg());
}
$folders = $folder->getAll();
$tree = new tree($folders, 0);
$rows = $tree->getChild($parentid);
$position = $tree->getPosition($parentid);
foreach ($position as $p) {
$pos[zotop::url('system/folder/index/' . $p['id'])] = $p['title'];
}
$page = new page();
$page->set('title', zotop::t('文件管理'));
$page->set('navbar', $this->navbar($parentid));
$page->set('position', array(zotop::url('system/file') => zotop::t('文件管理'), zotop::url('system/folder') => zotop::t('分类管理')) + (array) $pos + array('列表'));
$page->set('folders', $folders);
$page->set('rows', $rows);
$page->set('hash', $hash);
$page->display();
}
示例4: onDefault
public function onDefault()
{
if (form::isPostBack()) {
$post = array();
$post['username'] = request::post('username');
$post['password'] = request::post('password');
$post['logintime'] = time();
$user = zotop::model('zotop.user');
$data = $user->read($post['username'], 'username');
//zotop::dump($data);
if ($data == false) {
msg::error('登陆失败', zotop::t('账户名称`{$username}`不存在,请检查!', array('username' => $post['username'])));
}
zotop::user($data);
msg::success('登陆成功', '登陆成功,系统正在加载中', 'reload', 2);
}
if (zotop::user() != null) {
zotop::redirect('zotop/index');
}
$header['title'] = '用户登录';
$header['js'] = url::module() . '/admin/js/login.js';
$header['body']['class'] = "login";
page::header($header);
block::header(array('id' => 'LoginWindow', 'title' => '用户登录'));
form::header(array('title' => '', 'description' => '请输入用户名和密码', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('帐 户(U)'), 'name' => 'username', 'value' => zotop::user('username'), 'valid' => 'required:true'));
form::field(array('type' => 'password', 'label' => zotop::t('密 码(P)'), 'name' => 'password', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '登 陆'), array('type' => 'button', 'name' => 'options', 'value' => '选 项'));
form::footer();
block::footer();
page::footer();
}
示例5: actionIndex
public function actionIndex()
{
$page = new page();
$page->title = zotop::t('系统管理');
$page->navbar = $this->navbar();
$page->display();
}
示例6: editAction
public function editAction($tablename)
{
if (form::isPostBack()) {
$tablename = request::post('tablename');
$name = request::post('name');
$comment = request::post('comment');
$primary = request::post('primary');
if (strtolower($tablename) !== strtolower($name)) {
$rename = zotop::db()->table($tablename)->rename($name);
}
if ($comment !== NULL) {
$comment = zotop::db()->table($name)->comment($comment);
}
if ($primary) {
$primary = zotop::db()->table($name)->primary($primary);
}
$this->success('数据表设置成功,正在刷新页面,请稍后……', zotop::url('database/table'));
}
$db = zotop::db();
$database = $db->config();
$tables = $db->tables(true);
$table = $tables[$tablename];
if (!isset($table)) {
$this->error(zotop::t('数据表{$tablename}不存在', array('tablename' => $tablename)));
}
$page = new dialog();
$page->title = '数据库管理:' . $database['database'] . ' @ ' . $database['hostname'] . '<i>></i> 编辑:' . $tablename;
$page->set('database', $database);
$page->set('table', $table);
$page->display();
}
示例7: changePasswordAction
public function changePasswordAction()
{
$user = zotop::model('zotop.user');
$user->id = (int) zotop::user('id');
$user->username = (string) zotop::user('username');
if (form::isPostBack()) {
$user->read();
$password = request::post('password');
$newpassword = request::post('newpassword');
if ($user->password($password) != $user->password) {
msg::error(zotop::t('您输入的原密码:<b>{$password}</b>错误,请确认', array('password' => $password)));
}
if ($newpassword != request::post('newpassword2')) {
msg::error(zotop::t('两次输入的新密码不一致,请确认'));
}
if ($newpassword != $password) {
$update = $user->update(array('id' => $user->id, 'password' => $user->password($newpassword)));
}
msg::success(zotop::t('密码修改成功,请记住您的新密码'), url::current());
}
$page = new page();
$page->title = '修改我的密码';
$page->set('user', $user);
$page->set('navbar', $this->navbar());
$page->display();
}
示例8: actionIndex
public function actionIndex($type = '')
{
$file = zotop::model('zotop.file');
if (!empty($type)) {
$where = array('type', '=', $type);
}
$files = $file->db()->where($where)->orderby('createtime', 'desc')->getPage();
$pagination = new pagination();
$pagination->page = $files['page'];
$pagination->pagesize = $files['pagesize'];
$pagination->total = $files['total'];
$p = $pagination->render();
$totalsize = $file->totalsize();
$totalcount = $file->count();
$page = new page();
$page->set('title', zotop::t('文件管理'));
$page->set('navbar', $this->navbar());
$page->set('page', $files['page']);
$page->set('pagesize', $files['pagesize']);
$page->set('total', $files['total']);
$page->set('files', $files['data']);
$page->set('totalsize', $totalsize);
$page->set('totalcount', $totalcount);
$page->set('pagination', $p);
$page->display();
}
示例9: actionDelete
public function actionDelete($tablename)
{
$delete = zotop::db()->table($tablename)->drop();
if (!$delete) {
msg::error(zotop::t('删除数据表{$tablename}失败', array('tablename' => $tablename)));
}
msg::success('删除成功', zotop::url('database/table'));
}
示例10: types
public function types($type = '')
{
$types = array('core' => zotop::t('核心模块'), 'com' => zotop::t('功能模块'), 'plugin' => zotop::t('插件模块'));
if (empty($type)) {
return $types;
}
return $types[$type];
}
示例11: actionSide
public function actionSide()
{
$category = zotop::model('content.category');
$tree = $category->getTree(0, '<span class="zotop-icon zotop-icon-$icon"></span><a href="' . zotop::url('content/content/index/$id') . '" target="mainIframe">$title</a>');
$page = new side();
$page->set('title', zotop::t('文件管理'));
$page->set('tree', $tree);
$page->display();
}
示例12: add
public function add($data = array())
{
$this->bind($data);
if ((int) $this->id <= 0) {
$this->error(zotop::t('编号不能为空'));
return false;
}
$this->insert();
return $this->error() ? false : true;
}
示例13: success
/**
* 显示成功消息
*
*/
public static function success($content = '', $url = '', $life = 2)
{
$msg = array('type' => 'success', 'title' => zotop::t('success'), 'content' => '', 'detail' => '', 'url' => $url, 'life' => $life, 'action' => '');
if (is_array($content)) {
$msg = array_merge($msg, $content, array('type' => 'success'));
} else {
$msg['content'] = $content;
}
msg::show($msg);
}
示例14: onSend
public function onSend()
{
$header['title'] = '发送短消息';
dialog::header($header);
form::header(array('title' => '', 'description' => '请输入收信人的账户并输入短消息内容', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('收信人'), 'name' => 'sendto', 'value' => '', 'description' => '请输入收信人的账户名称,多个账户之间请用’逗号‘隔开'));
form::field(array('type' => 'textarea', 'label' => zotop::t('内 容'), 'name' => 'content', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '发 送'), array('type' => 'button', 'name' => 'close', 'value' => '取消', 'class' => 'zotop-dialog-close'));
form::footer();
dialog::footer();
}
示例15: onBing
public function onBing()
{
$header['title'] = 'Bing搜索';
dialog::header($header);
dialog::navbar($this->navbar(), 'bing');
form::header(array('title' => '', 'description' => '<span class="zotop-tip">请先搜索图片,然后插入</span>'));
dialog::add(html::iframe('images', 'about:blank', array('width' => '100%', 'style' => 'width:100%;height:200px;')));
form::buttons(array('id' => 'UploadImages', 'type' => 'submit', 'value' => '插入图片'), array('type' => 'button', 'value' => zotop::t('取消'), 'class' => 'zotop-dialog-close'));
form::footer();
dialog::footer();
}