• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BackendTranslate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: login

 function login()
 {
     if ($this->request->data) {
         $this->loadModel(USER);
         $data = $this->request->data;
         $data->password = sha1($data->password);
         $user = $this->User->findFirst(array('conditions' => array('login' => $data->login, 'password' => $data->password)));
         if (!empty($user)) {
             $date = new DateTime();
             $user->login_last = $date->format('Y-m-d H:i:s');
             $user->online = 1;
             $this->User->save($user);
             $this->Session->write(USER, $user);
             unset($_SESSION[USER]->password);
             $this->logger->LogInfo($this->request->controller, $this->request->action, $user->login, BackendTranslate::getLabel('login_success'));
         } else {
             $this->request->data->login = EMPTYSTRING;
             $this->logger->LogError($this->request->controller, $this->request->action, EMPTYSTRING, BackendTranslate::getLabel('login_failed'));
             $this->Session->setAlert(BackendTranslate::getLabel('login_failed'), DANGER);
         }
     }
     if ($this->Session->isLogged()) {
         if ($this->Session->user('category') <= 3 && $this->Session->user('category') >= 1) {
             $this->redirect('cockpit/dashboard/dashboard');
         } else {
             $this->redirect(EMPTYSTRING);
         }
     } else {
         $this->layout = 'site_default';
         $this->redirect('page/login_page');
     }
 }
开发者ID:WebPassions,项目名称:2015,代码行数:32,代码来源:UserController.php


示例2: edit

 function edit($id = null)
 {
     $this->permission(3);
     if ($id === null || !is_numeric($id)) {
         $this->redirect('cockpit/configuration');
         return false;
     }
     $this->loadModel('Configuration');
     $d['id'] = $id;
     $this->set($d);
     if ($this->request->data) {
         $key = $this->request->data->keyword;
         $this->request->data->value = $this->request->data->{$key};
         unset($this->request->data->{$key});
         $id = $this->Configuration->save($this->request->data);
         if (!is_numeric($id)) {
             $this->logger->LogError($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel(DB) . '/id:' . $id);
             $this->Session->setAlert(BackendTranslate::getLabel(DB) . $id, DANGER);
             $this->redirect('cockpit/configuration/edit/' . $d['id']);
             return false;
         }
         $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel('updatedConfig') . '/id:' . $id);
         $this->redirect('cockpit/configuration');
         return false;
     } else {
         $this->request->data = $this->Configuration->findFirst(array('conditions' => array('id' => $id)));
     }
 }
开发者ID:WebPassions,项目名称:2015,代码行数:28,代码来源:ConfigurationController.php


示例3: form

 function form()
 {
     if ($this->request->data) {
         $this->loadModel(CONTACT);
         $mail = new PHPMailer();
         $mail->From = $this->request->data->mail;
         $mail->FromName = $this->request->data->name;
         $message = $this->request->data->content;
         if ($this->request->data->sendcopy == 1) {
             $mail->AddAddress($this->request->data->mail);
             $message .= "<div><div dir=\"ltr\"><div><span style=\"color:rgb(11,83,148)\">Bien à vous,<i><b><br></b></span></span></div><div><span style=\"color:rgb(11,83,148)\"><i><b><br>WebPassions</b><br></span></span></div><div><span style=\"color:rgb(11,83,148)\">Lorge Vivian<br></span></div><div><span style=\"color:rgb(11,83,148)\"><i>0479/95.98.45</span><br></span></div><span style=\"color:rgb(11,83,148)\"><a target=\"_blank\" href=\"http://www.webpassions.be\"><i>http://www.webpassions.be</span></a></span><br><div><br><div><img width=\"96\" height=\"28\" src=\"http://www.webpassions.be/signature.png\"><br><br><br></div></div></div></div>";
         }
         $mail->IsHTML(true);
         $mail->CharSet = 'UTF-8';
         $mail->AddAddress($_SESSION['cmscontact']);
         $mail->AddReplyTo($_SESSION['cmscontact']);
         $mail->Subject = $_SESSION['cmscontactcategory'][$this->request->data->subject];
         $mail->Body = $message;
         if (!$mail->Send()) {
             $this->logger->LogError($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel('send_error') . $mail->ErrorInfo);
             $this->Session->setAlert(BackendTranslate::getLabel('send_error') . $mail->ErrorInfo, DANGER);
         } else {
             $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel('send_mail'));
             $this->Session->setAlert(BackendTranslate::getLabel('send_mail'), SUCCESS);
         }
         unset($mail);
     }
 }
开发者ID:WebPassions,项目名称:2015,代码行数:28,代码来源:ContactController.php


示例4: init

 protected function init($name)
 {
     $buffer = EMPTYSTRING;
     $buffer .= '<div class="form-group' . $this->error($name) . '">';
     $buffer .= '<label for="input' . $name . '" class="col-sm-3 control-label">' . BackendTranslate::getLabel($name) . '</label>';
     $buffer .= '<div class="col-sm-9">';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:8,代码来源:Form.php


示例5: back

 public function back($url)
 {
     $buffer = EMPTYSTRING;
     $buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-primary btn-sm">';
     $buffer .= '<i class="fa fa-backward"></i>&nbsp;';
     $buffer .= BackendTranslate::getLabel(BACK);
     $buffer .= '</a>';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:9,代码来源:FormLink.php


示例6: send

 public function send()
 {
     $buffer = EMPTYSTRING;
     $buffer .= '<button type="submit" class="btn btn-info btn-sm">';
     $buffer .= '<i class="fa fa-envelope"></i>&nbsp;';
     $buffer .= BackendTranslate::getLabel('send');
     $buffer .= '</button>';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:9,代码来源:FormSubmit.php


示例7: passwordPlaceHolder

 public function passwordPlaceHolder($name)
 {
     $value = isset($this->controller->request->data->{$name}) ? stripslashes($this->controller->request->data->{$name}) : EMPTYSTRING;
     $buffer = EMPTYSTRING;
     $buffer .= '<div class="form-group">';
     $buffer .= '<input type="password" id="input' . $name . '" name="' . $name . '" value="' . $value . '" class="form-control" placeholder="' . BackendTranslate::getLabel($name) . '" ' . $this->required(true) . '>';
     $buffer .= '</div>';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:9,代码来源:FormField.php


示例8: passwordPlaceHolder

 public function passwordPlaceHolder($name)
 {
     $value = isset($this->controller->request->data->{$name}) ? stripslashes($this->controller->request->data->{$name}) : EMPTYSTRING;
     $buffer = EMPTYSTRING;
     $buffer .= '<div class="form-group' . $this->error($name) . '">';
     $buffer .= '<input type="password" id="input' . $name . '" name="' . $name . '" value="' . $value . '" class="form-control" placeholder="' . BackendTranslate::getLabel($name) . '" ' . $this->required(true) . '>';
     $error = $this->error($name);
     if (!empty($error)) {
         $buffer .= '<span class="help-block">' . $this->errors[$name] . '</span>';
     }
     $buffer .= '</div>';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:13,代码来源:FormField.php


示例9: view

 function view($id = null)
 {
     $this->loadModel(PAGE);
     if ($id === null || !is_numeric($id)) {
         $this->layout = 'site_home';
     } else {
         $d[PAGE] = $this->Page->findFirst(array('conditions' => array('online' => 1, 'id' => $id)));
         if (empty($d[PAGE])) {
             $this->e404(BackendTranslate::getLabel('page_not_found'));
         }
         $this->set($d);
     }
 }
开发者ID:WebPassions,项目名称:2015,代码行数:13,代码来源:PageController.php


示例10: visible

 public function visible($url, $online)
 {
     $buffer = EMPTYSTRING;
     if ($online == 1) {
         $buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-xs btn-' . SUCCESS . '">';
     } else {
         $buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-xs btn-' . DANGER . '">';
     }
     $buffer .= '<span class="glyphicon glyphicon-refresh"></span>&nbsp;';
     if ($online == 1) {
         $buffer .= BackendTranslate::getLabel('show');
     } else {
         $buffer .= BackendTranslate::getLabel('hide');
     }
     $buffer .= '</a>&nbsp;|&nbsp;';
     return $buffer;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:17,代码来源:FormLink.php


示例11:

?>
	</li>
</ol>

<?php 
echo $this->Session->getAlert();
?>

<form action="<?php 
echo Router::generateURL('cockpit/user/changePasswordIn');
?>
" method="post" class="form-horizontal">
	<div class="panel panel-warning">
		<div class="panel-heading">
			<h3 class="panel-title"><i class="fa fa-edit"></i> <?php 
echo BackendTranslate::getLabel('change_password');
?>
</h3>
		</div>
		<div class="panel-body">
			<?php 
echo $this->FormField->password('new_password', false, 'form-control');
?>
			<?php 
echo $this->FormField->password('verify', false, 'form-control');
?>
		</div>
		<div class="panel-footer text-right">
			<?php 
echo $this->FormSubmit->update();
?>
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:changePasswordIn.php


示例12:

	<div class="col-lg-12">
		<form action="<?php 
echo Router::generateURL('cockpit/blogtrip/add');
?>
" method="post" class="form-horizontal">
			<?php 
echo $this->FormField->hidden('creation');
echo $this->FormField->hidden('updated');
echo $this->FormField->hidden('updater');
echo $this->FormField->hidden('logical_delete');
?>
		
			<div class="panel panel-info">
				<div class="panel-heading">
					<span class="glyphicon glyphicon-plus"></span> <?php 
echo BackendTranslate::getLabel(ADD);
?>
				</div>
				<div class="panel-body">
					<?php 
echo $this->FormField->text('name', false, true);
echo $this->FormField->text('slug', false, true);
echo $this->FormField->lookup('image_path');
echo $this->FormField->text('introduction', false, true);
echo $this->FormField->textArea('content', false);
echo $this->FormField->checkBox('online', false);
echo $this->FormField->checkBox('favorite', false);
?>
				</div>
				<div class="panel-footer text-right">
					<?php 
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:add.php


示例13:

?>
					<span class="pull-right"><?php 
echo $this->FormLink->add('cockpit/portfolio/add');
?>
</span>
				</h3>
			</div>
			<div class="panel-body">		
				<table class="table table-hover table-bordered responsive nowrap" id="portfoliodata" style="width:100%;">
					<thead>
					<tr>
						<?php 
echo '<th>' . BackendTranslate::getLabel('name') . '</th>';
echo '<th style="width:15%;">' . BackendTranslate::getLabel('category') . '</th>';
echo '<th style="width:10%;">' . BackendTranslate::getLabel('creation') . '</a></th>';
echo '<th style="width:30%;" class="text-right">' . BackendTranslate::getLabel('action') . '</th>';
?>
					</tr>
					</thead>
					<tbody>
						<?php 
foreach ($Portfolio as $k => $v) {
    echo $v->logical_delete == 1 ? '<tr class="danger">' : '<tr>';
    echo '<td>';
    if (!empty($v->image_path)) {
        echo '<div class="btn-group">';
        echo '<button class="btn dropdown-toggle btn-primary btn-xs" data-toggle="dropdown"><span class="glyphicon glyphicon-camera"></span></button>';
        echo '<div class="dropdown-menu" style="margin:0;padding:0;border:0;">';
        echo '<img src="' . Router::webroot($v->image_path) . '" class="img-thumbnail" style="width:200px;"/>';
        echo '</div></div>&nbsp;|&nbsp;';
    }
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:listing.php


示例14:

<!DOCTYPE html>
<html lang="fr"> 
	<head> 
		<meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">        
		<meta name="keywords" content="">
		<meta name="author" content="<?php 
echo BackendTranslate::getLabel('author_webpassions');
?>
">
		<link rel="shortcut icon" href="<?php 
echo Router::webroot('utils/img/favicon_cms.png');
?>
" />

		<title><?php 
echo TITLE_COCKPIT;
?>
</title>
		<link rel="stylesheet" href="<?php 
echo Router::webroot('utils/css/site_admin.css');
?>
" >
		
		<script type="text/javascript" src="<?php 
echo Router::webroot('utils/js/jquery-1.9.1.min.js');
?>
"></script>
		<script type="text/javascript" src="<?php 
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:admin.php


示例15: delete

 function delete($id = null)
 {
     $this->permission(3);
     if ($id === null || !is_numeric($id)) {
         $this->redirect('cockpit/user');
         return false;
     }
     $this->loadModel(USER);
     $d['id'] = $id;
     $this->set($d);
     if ($this->request->data) {
         $this->request->data->logical_delete = 1;
         $id = $this->User->save($this->request->data);
         if (!is_numeric($id)) {
             $this->logger->LogError($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel(DB) . '/id:' . $id);
             $this->Session->setAlert(BackendTranslate::getLabel(DB) . $id, DANGER);
             $this->redirect('cockpit/user');
             return false;
         }
         $this->logger->LogInfo($this->request->controller, $this->request->action, $_SESSION[USER]->login, BackendTranslate::getLabel('deleted') . '/id:' . $id);
         $this->Session->setAlert(BackendTranslate::getLabel('deleted'), SUCCESS);
         $this->redirect('cockpit/user');
     } else {
         $this->request->data = $this->User->findFirst(array('fields' => ProjectUtils::$table[USER] . ', UserRole.category', 'conditions' => array('User.id' => $id), 'join' => array('userrole as UserRole' => 'UserRole.id=User.category')));
     }
 }
开发者ID:WebPassions,项目名称:2015,代码行数:26,代码来源:UserController.php


示例16: foreach

foreach ($_SESSION['cmsmodules'] as $module) {
    ?>
				<tr><td><?php 
    echo $module;
    ?>
</td></tr>
			<?php 
}
?>
			</tbody>
		</table>

		<table class="table  table-bordered table-hover table-vcenter" style="margin:20px 0;">
			<thead>
			<tr><th colspan="2"><?php 
echo BackendTranslate::getLabel('php_info');
?>
</th></tr>
			</thead>
			<tbody>
			<?php 
foreach ($phpinfo as $key => $value) {
    ?>
				<?php 
    if ($key == 'Apache Version ' || $key == 'memory_limit' || $key == 'post_max_size' || $key == 'upload_max_filesize' || $key == 'Default timezone ' || $key == 'memory_limit' || $key == 'HTTP_USER_AGENT ' || $key == 'SERVER_NAME ' || $key == 'SERVER_ADDR ' || $key == 'SERVER_PORT ' || $key == 'DOCUMENT_ROOT ' || $key == 'REDIRECT_URL ' || $key == 'REQUEST_URI ') {
        ?>
					<tr><td><?php 
        echo $key;
        ?>
</td><td><?php 
        echo $value;
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:listing.php


示例17:

?>
                <?php 
echo $this->FormField->emailPlaceHolder('mail');
?>
			
				<?php 
echo $this->Session->getAlert();
?>
			
				<div class="form-groups text-center">			
					<button type="submit" class="btn btn-success btn-sm">
						<i class="fa fa-lock"></i>
						&nbsp;<?php 
echo BackendTranslate::getLabel('send');
?>
					</button>			
					 <a href="<?php 
echo Router::generateURL('user/login');
?>
" class="btn btn-info btn-sm">
						<i class="fa fa-backward"></i>
						&nbsp;<?php 
echo BackendTranslate::getLabel(BACK);
?>
					</a>
				</div>
				
			</form>
		</div>
	</div>
</div>
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:forgotPassword.php


示例18:

<?php

$title_for_layout = BackendTranslate::getLabel('page_not_found');
?>

<div class="text-justify">

    <h2>
        <?php 
echo $title_for_layout;
?>
        <br/><br/>
        <small class="DANGER"><?php 
echo BackendTranslate::getLabel('e404');
?>
</small>
    </h2>

    <p><?php 
echo $message;
?>
</p>

</div>
开发者ID:WebPassions,项目名称:2015,代码行数:24,代码来源:404.php


示例19:

	</li>
	<li class="active">
		<?php 
echo BackendTranslate::getLabel(CONSULT);
?>
	</li>
</ol>

<form action="" method="post" class="form-horizontal">
	<?php 
echo $this->FormField->hidden('id');
?>
	<div class="panel panel-success">
		<div class="panel-heading">
			<h3 class="panel-title"><i class="fa fa-eye"></i> <?php 
echo BackendTranslate::getLabel(CONSULT);
?>
</h3>
		</div>
		<div class="panel-body">			
			<?php 
if ($this->Session->user('category') == 3) {
    ?>
				<?php 
    if ($this->request->data->logical_delete == 1) {
        echo $this->FormField->text('logical_delete', true, false);
    }
    ?>
				<?php 
    echo $this->FormField->dateText('creation', true, false);
    ?>
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:consult.php


示例20:

            echo BackendTranslate::getLabel('jul');
            break;
        case "8":
            echo BackendTranslate::getLabel('aug');
            break;
        case "9":
            echo BackendTranslate::getLabel('sep');
            break;
        case "10":
            echo BackendTranslate::getLabel('oct');
            break;
        case "11":
            echo BackendTranslate::getLabel('nov');
            break;
        case "12":
            echo BackendTranslate::getLabel('dec');
            break;
    }
    ?>
</td>
                    <td><?php 
    echo $record->getNewvisits();
    ?>
</td>
                    <td><?php 
    echo $record->getVisits();
    ?>
</td>
                    <td><?php 
    echo $record->getPageviews();
    ?>
开发者ID:WebPassions,项目名称:2015,代码行数:31,代码来源:listing.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BackendUser类代码示例发布时间:2022-05-23
下一篇:
PHP BackendTemplate类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap