當前位置: 首頁>>代碼示例>>PHP>>正文


PHP language::lang_echo方法代碼示例

本文整理匯總了PHP中language::lang_echo方法的典型用法代碼示例。如果您正苦於以下問題:PHP language::lang_echo方法的具體用法?PHP language::lang_echo怎麽用?PHP language::lang_echo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在language的用法示例。


在下文中一共展示了language::lang_echo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 public function run()
 {
     $tpl = new template();
     $id = (int) $_GET['id'];
     $language = new language();
     $language->setModule('leads');
     $language->readIni();
     if ($id > 0) {
         if (isset($_POST['delete'])) {
             $this->deleteLead($id);
             $tpl->setNotification($language->lang_echo('LEAD_DELETED'), 'success');
         }
         $tpl->assign('lead', $this->getLead($id));
     } else {
         $tpl->display('general.error');
     }
     $tpl->display('leads.deleteLead');
 }
開發者ID:DevelopIdeas,項目名稱:leantime,代碼行數:18,代碼來源:class.deleteLead.php

示例2: displayNotification

 public function displayNotification()
 {
     $language = new language();
     $language->setModule('notifications');
     $language->readIni();
     $notification = '';
     $note = $this->getNotification();
     if (!empty($note) && $note['msg'] != '' && $note['type'] != '') {
         $notification = "<div class='alert alert-" . $note['type'] . "'>\n\t\t\t\t\t\t\t\t<button data-dismiss='alert' class='close' type='button'>×</button>\n\t\t\t\t\t\t\t\t<strong>" . ucfirst($note['type']) . "!</strong> " . $language->lang_echo($note['msg'], false) . "\n\t\t\t\t\t\t\t</div>";
     }
     return $notification;
 }
開發者ID:DevelopIdeas,項目名稱:leantime,代碼行數:12,代碼來源:class.template.php

示例3:

			jQuery('.commentBox textarea').remove(); 

			jQuery('#comment'+id+'').prepend('<textarea rows="5" cols="75" name="text"></textarea>');
			
		}); 

		jQuery('#comment'+id+'').show('fast');			
		
		jQuery('#father').val(id);	
	}	

</script>

<form method="post" accept-charset="utf-8" action="#comment" id="commentForm">
	<a href="javascript:void(0);" onclick="toggleCommentBoxes(0)"><?php 
echo $language->lang_echo('COMMENT');
?>
</a>
	<div id="comment0" class="commentBox">
		
		<textarea rows="5" cols="50" name="text"></textarea><br />
		
		<input type="submit" value="<?php 
echo $language->lang_echo('SUBMIT');
?>
" name="comment" class="button" />

		<input type="hidden" name="father" id="father" value="0"/>
		
		<br />
	</div>
開發者ID:DevelopIdeas,項目名稱:leantime,代碼行數:31,代碼來源:generalComment.sub.php

示例4: run

 /**
  * run - display template and edit data
  *
  * @access public
  *
  */
 public function run()
 {
     $tpl = new template();
     if (isset($_GET['id'])) {
         $id = (int) $_GET['id'];
         $project = $this->getProject($id);
         $helper = new helper();
         $language = new language();
         $language->setModule('projects');
         $lang = $language->readIni();
         //Calculate projectdetails
         $opentickets = $this->getOpenTickets($id);
         $closedTickets = $project['numberOfTickets'] - $opentickets['openTickets'];
         if ($project['numberOfTickets'] != 0) {
             $projectPercentage = round($closedTickets / $project['numberOfTickets'] * 100, 2);
         } else {
             $projectPercentage = 0;
         }
         if ($project['numberOfTickets'] == NULL) {
             $project['numberOfTickets'] = 1;
         }
         //Post comment
         $comments = new comments();
         if (isset($_POST['comment']) === true) {
             $values = array('text' => $_POST['text'], 'datetime' => date("Y-m-d H:i:s"), 'userId' => $_SESSION['userdata']['id'], 'moduleId' => $id, 'commentParent' => $_POST['father']);
             $comments->addComment($values, 'project');
             $tpl->setNotification('COMMENT_ADDED', 'success');
         }
         $file = new files();
         if (isset($_POST['upload'])) {
             if (isset($_FILES['file'])) {
                 $file->upload($_FILES, 'project', $id);
                 $tpl->setNotification('FILE_UPLOADED', 'success');
             } else {
                 $tpl->setNotification('NO_FILE', 'error');
             }
         }
         $timesheets = new timesheets();
         $language = new language();
         $language->setModule('projects');
         $lang = $language->readIni();
         $data = array();
         $months = array();
         $results = $timesheets->getProjectHours($id);
         $allHours = 0;
         $max = 0;
         foreach ($results as $row) {
             if ($row['month'] != NULL) {
                 $data[] = (int) $row['summe'];
                 $months[] = substr($language->lang_echo('MONTH_' . $row['month'] . ''), 0, 3);
                 if ($row['summe'] > $max) {
                     $max = $row['summe'];
                 }
             } else {
                 $allHours = $row['summe'];
             }
         }
         $steps = 10;
         if ($max > 100) {
             $steps = 50;
         }
         $max = $max + $steps;
         $tpl->assign('timesheetsAllHours', $allHours);
         $chart = "";
         $tpl->assign('chart', $chart);
         //Delete File
         if (isset($_GET['delFile']) === true) {
             $file = $_GET['delFile'];
             $upload = new fileupload();
             $upload->initFile($file);
             $upload->deleteFile($file);
             $this->deleteFile($file);
             $this->setNotification('FILE_DELETED', 'success');
         }
         //Delete comment
         if (isset($_GET['delComment']) === true) {
             $commentId = (int) $_GET['delComment'];
             $this->deleteComment($commentId);
             $this->setNotification('COMMENT_DELETED');
         }
         //Delete account
         if (isset($_GET['delAccount']) === true) {
             $accountId = (int) $_GET['delAccount'];
             $this->deleteAccount($accountId);
             $this->setNotification('ACCOUNT_DELETED');
         }
         //Timesheets
         $invEmplCheck = '0';
         $invCompCheck = '0';
         $projectFilter = $id;
         $dateFrom = mktime(0, 0, 0, date("m"), '1', date("Y"));
         $dateFrom = date("Y-m-d", $dateFrom);
         $dateTo = date("Y-m-d 00:00:00");
         $kind = 'all';
//.........這裏部分代碼省略.........
開發者ID:DevelopIdeas,項目名稱:leantime,代碼行數:101,代碼來源:class.showProject.php


注:本文中的language::lang_echo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。