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


PHP CommonFunctions::getCssClassForMessage方法代碼示例

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


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

示例1: testGetCssClassForMessage

 /**
  * Test case for getCssClassForMessage method
  */
 public function testGetCssClassForMessage()
 {
     $this->assertEquals("success", CommonFunctions::getCssClassForMessage("ADD_SUCCESS"));
     $this->assertEquals("failure", CommonFunctions::getCssClassForMessage("JUST_ANOTHER_Failure"));
     $this->assertEquals("required", CommonFunctions::getCssClassForMessage("REQUIRED"));
     $this->assertEquals("", CommonFunctions::getCssClassForMessage(""));
     $this->assertEquals("", CommonFunctions::getCssClassForMessage(null));
 }
開發者ID:noikiy,項目名稱:owaspbwa,代碼行數:11,代碼來源:CommonFunctionsTest.php

示例2: isset

echo $lang_Common_Back;
?>
"
            	onmouseover="moverButton(this)" onmouseout="moutButton(this)" onclick="backToDefineProjectReport();" />
        </div>
        <div class="outerbox">
            <div class="mainHeading"><h2><?php 
echo $lang_Time_ProjectReportTitle;
?>
</h2></div>

        <?php 
$message = isset($this->getArr['msg']) ? $this->getArr['msg'] : (isset($this->getArr['message']) ? $this->getArr['message'] : null);
if (isset($_GET['message'])) {
    $message = $_GET['message'];
    $messageType = CommonFunctions::getCssClassForMessage($message);
    $message = "lang_Time_Errors_" . $message;
    ?>
            <div class="messagebar">
                <span class="<?php 
    echo $messageType;
    ?>
"><?php 
    echo isset(${$message}) ? ${$message} : "";
    ?>
</span>
            </div>
        <?php 
}
?>
開發者ID:googlecode-mirror,項目名稱:pucit-orangehrm,代碼行數:30,代碼來源:projectReport.php

示例3:

    $summary = $records[1];
}
?>
<h2>
	<?php 
echo "{$lang_Benefits_PersonalHspSummary} : {$year}";
if (isset($summary[0])) {
    echo " : {$summary[0]['employee_name']}";
}
?>
	<hr/>
</h2>
<?php 
if (isset($_GET['message'])) {
    $expString = $_GET['message'];
    $col_def = CommonFunctions::getCssClassForMessage($expString);
    $expString = 'lang_Benefits_Errors_' . $expString;
    ?>
		<font class="<?php 
    echo $col_def;
    ?>
" size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<?php 
    echo ${$expString};
    ?>
		</font>
<?php 
}
?>
<script type="text/javascript">
var commonAction = '?benefitcode=Benefits&year=<?php 
開發者ID:googlecode-mirror,項目名稱:pucit-orangehrm,代碼行數:31,代碼來源:personalHspSummary.php

示例4: cancelAddPayPeriod

function cancelAddPayPeriod() {
	window.history.go(-1);
}

</script>
<div class="outerbox">
    <div class="mainHeading"><h2><?php 
echo $lang_Benefits_HealthSavingsPlanUsedList . " : " . $empFullName;
?>
</h2></div>

<?php 
if (isset($_GET['message'])) {
    $expString = $_GET['message'];
    $messageType = CommonFunctions::getCssClassForMessage($expString);
    $expString = 'lang_Benefits_Errors_' . $expString;
    ?>
    <div class="messagebar">
        <span class="<?php 
    echo $messageType;
    ?>
"><?php 
    echo ${$expString};
    ?>
</span>
    </div>
<?php 
}
?>
開發者ID:googlecode-mirror,項目名稱:pucit-orangehrm,代碼行數:29,代碼來源:listHspPaymentRequestsUsed.php

示例5: isset

echo $styleSheet;
?>
/pictures/btn_back.gif';"
  			 onMouseOver="this.src='../../themes/<?php 
echo $styleSheet;
?>
/pictures/btn_back_02.gif';"
  			 src="../../themes/<?php 
echo $styleSheet;
?>
/pictures/btn_back.gif" onClick="goBack();">
	</div>
    <?php 
$message = isset($_GET['message']) ? $_GET['message'] : null;
if (isset($message)) {
    $col_def = CommonFunctions::getCssClassForMessage($message);
    $message = "lang_Common_" . $message;
    ?>
	<div class="message">
		<font class="<?php 
    echo $col_def;
    ?>
" size="-1" face="Verdana, Arial, Helvetica, sans-serif">
			<?php 
    echo isset(${$message}) ? ${$message} : "";
    ?>
		</font>
	</div>
	<?php 
}
?>
開發者ID:noikiy,項目名稱:owaspbwa,代碼行數:31,代碼來源:jobVacancy.php


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