示例#1
0
文件: Msg.php 项目: reekoheek/php-fw
	function message($key = "message.defaultMessage", $scope = "global") {
		$retval = "";
		$sessionMsg = Session::load(MSG_SCOPE, $scope);
		if (!empty($sessionMsg)) {
			reset($sessionMsg);
			$retval .= Msg::get("message.extra.warning");
			foreach ($sessionMsg as $message) {
				$retval .= "<div>".$message["string"]."</div>\n";
			}
			
		} else {
			$retval = Msg::get("message.extra.tooltip").Msg::get($key);
		}
		return $retval;
	}
示例#2
0
	function datetime($format, Date $date) {
		// TODO you can only use dd MM yy yyyy HH mm ss
		$format = Msg::get($format);
		$patterns[0] = '/dd/';
		$patterns[1] = '/MM/';
		$patterns[2] = '/yyyy/';
		$patterns[3] = '/yy/';
		$patterns[4] = '/HH/';
		$patterns[5] = '/mm/';
		$patterns[6] = '/ss/';
		$replacements[6] = sprintf("%02d", $date->date);
		$replacements[5] = sprintf("%02d", $date->month);
		$replacements[4] = sprintf("%04d", $date->year);
		$replacements[3] = sprintf("%02d", $date->year % 100);
		$replacements[2] = sprintf("%02d", $date->hour);
		$replacements[1] = sprintf("%02d", $date->minute);
		$replacements[0] = sprintf("%02d", $date->second);
		echo preg_replace($patterns, $replacements, $format);
	}
示例#3
0
	function addMsgMessage($key, $field = null, $param = null) {
		if ($field != null) {
			$param[] = Msg::get($field);
		}
		$this->addMsgString(Msg::get($key, $param), $field);
	}
示例#4
0
文件: msgList.php 项目: krvd/cms-Inji
<?php

foreach (Msg::get() as $msg) {
    ?>
    <div class="alert alert-<?php 
    echo $msg['status'];
    ?>
 alert-dismissable">
      <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
      <strong><?php 
    switch ($msg['status']) {
        case 'success':
            echo 'Успех!';
            break;
        case 'danger':
        case 'warning':
            echo 'Внимание!';
            break;
        default:
            echo 'Информация.';
    }
    ?>
</strong> <?php 
    echo $msg['text'];
    ?>
    </div>
    <?php 
}
Msg::flush();
示例#5
0
				<td>:</td>
				<td><?=nl2br($this->lookup["type"])?></td>
			</tr>
			<tr>
				<td><?=Msg::get("lookup.code")?></td>
				<td>:</td>
				<td><?=nl2br($this->lookup["code"])?></td>
			</tr>
			<tr>
				<td><?=Msg::get("lookup.name")?></td>
				<td>:</td>
				<td><?=nl2br($this->lookup["name"])?></td>
			</tr>
			<tr>
				<td><?=Msg::get("lookup.description")?></td>
				<td>:</td>
				<td><?=nl2br($this->lookup["description"])?></td>
			</tr>
			<tr>
				<td><?=Msg::get("lookup.priority")?></td>
				<td>:</td>
				<td><?=nl2br($this->lookup["priority"])?></td>
			</tr>
			<tr>
				<td colspan="3" class="Command">
					<?=FormTag::back("command.back", "lookup")?>
				</td>
			</tr>
		</table>
	</div>
</div>
示例#6
0
	function back($name, $url) {
		$value = Msg::get($name);
		return "<input type=\"button\" class=\"Button\" id=\"$name\" name=\"$name\" value=\"$value\" onclick=\"window.location.href = '".Apu::base()."/$url'\"/>\n";
	}
示例#7
0
	<div class="Title"><?=Msg::get("LookupAction.search.title")?></div>
	<div class="Message"><?=Msg::message("LookupAction.search.description")?></div>
	<div align="center">
		<table class="Form">
			<tr>
				<td><?=Msg::get("lookup.type")?></td>
				<td>:</td>
				<td><?=FormTag::text("list.filter.type", $this->list["filter"]["type"])?></td>
			</tr>
			<tr>
				<td><?=Msg::get("lookup.code")?></td>
				<td>:</td>
				<td><?=FormTag::text("list.filter.code", $this->list["filter"]["code"])?></td>
			</tr>
			<tr>
				<td colspan="3" class="Command">
					<?=FormTag::submit("command.search")?>
					<input type="button" class="Button" id="clear" value="<?=Msg::get("command.clear")?>"/>
					<script type="text/javascript">					
					Event.observe($('clear'), "click", LookupList.clear);
					</script>
					<input type="button" class="Button" frameId="searchFrame" id="close" value="<?=Msg::get("command.close")?>"/>
					<script type="text/javascript">					
					Event.observe($('close'), "click", LookupList.close);
					</script>
				</td>
			</tr>
		</table>
	</div>
</div>
</form>
示例#8
0
</script>

<form method="post" action="login/login">
<div class="Frame" style="width: 400px" id="login">
	<div class="Title"><?=Msg::get("LoginAction.title")?></div>
	<div class="Message"><?=Msg::message("LoginAction.description")?></div>
	<div style="height: 130px">
		<table id="centerized"><tr><td>
		<img src="themes/apu/img/security.gif"/>
		</td><td>
		<table class="Form">
			<tr>
				<td class="Label"><?=Msg::get("login.username")?></td>
				<td>:</td>
				<td><?=FormTag::text("login.username", $this->login["username"])?></td>
			</tr>
			<tr>
				<td class="Label"><?=Msg::get("login.password")?></td>
				<td>:</td>
				<td><?=FormTag::password("login.password", $this->login["password"])?></td>
			</tr>
			<tr>
				<td colspan="3" class="Command">
					<?=FormTag::submit("command.login")?>
				</td>
			</tr>
		</table>
		</td></tr></table>
	</div>
</div>
</form>
示例#9
0
			<a href="task/add">
				<img src="themes/apu/img/new.png" />
			</a>
		</th>
	</tr>
	<? if (!empty($_REQUEST["list"])) { ?>
	<? reset($_REQUEST["list"]); ?>
	<? while(list(,$row) = each($_REQUEST["list"])) { ?>
	<tr class="Row<?=$i%2?>">
		<td><?=$row["priority"]?></td>
		<td><?=$row["context"]?></td>
		<td><?=$row["project"]?></td>
		<td><?=$row["title"]?></td>
		<td><?=$row["created_by"]?></td>
		<td><?=$row["status"]?></td>
		<td>
			<a href="">
				<img src="themes/apu/img/edit.png" />
			</a>
			<a href="">
				<img src="themes/apu/img/del.png" />
			</a>
		</td>
	</tr>
	<?} ?>
	<? } else { ?>
	<tr class="Row0">
		<td colspan="100" align="center"><?=Msg::get("message.emptyRow") ?></td>
	</tr>
	<? } ?>
</table>
示例#10
0
文件: menu.php 项目: reekoheek/php-fw
	color: #3333AA;
}

div.Frame {
	margin-top: 7px;
	margin-bottom: 3px;
}

</style>

<script type="text/javascript" src="themes/prototype.js"></script>

<h2>Todo App</h2>
<div id="welcomeNote">
	<?=Msg::get("welcome.note", array( UserDao::loginFullName() ))?><br/>
	<?=$_REQUEST["date"] ?>
</div>

<? reset($_REQUEST["menu"]); ?>
<? while (list($key, $menu) = each($_REQUEST["menu"])) { ?>
<div class="Frame">
	<div class="Title"><?=Msg::get($menu["name"])?></div>
	<? if (!empty($menu["children"])) { ?>
	<div>
		<? while (list($subKey, $subMenu) = each($menu["children"])) { ?>
			<a class="Menu" href="<?=$subMenu["action"]?>" style="display: block;padding:2px 2px 2px 2px" target="<?=(empty($subMenu["target"]))?"main":$subMenu["target"]?>"><?=Msg::get($subMenu["name"])?></a>
		<? } ?>
	</div>
	<? } ?>
</div>
<? } ?>