本文整理汇总了PHP中Prado::localize方法的典型用法代码示例。如果您正苦于以下问题:PHP Prado::localize方法的具体用法?PHP Prado::localize怎么用?PHP Prado::localize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prado
的用法示例。
在下文中一共展示了Prado::localize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDefault
public function onDefault($sender, $param)
{
$cbs = $this->findControlsByType("TActiveCheckBox");
$nDelete = 0;
$koMsg = '';
$cbChecked = 0;
foreach ($cbs as $cb) {
if ((bool) $cb->getChecked() && $cb->Value != "0") {
$cbChecked++;
}
}
if ($cbChecked == 0) {
$koMsg = Prado::localize('Select one item');
} elseif ($cbChecked == 1) {
foreach ($cbs as $cb) {
if ((bool) $cb->getChecked() && $cb->Value != "0") {
$cmd = $this->db->createCommand("UPDATE hr_install SET `default`='0' WHERE type='template'");
$cmd->execute();
$cmd = $this->db->createCommand("UPDATE hr_install SET `default`='1' WHERE id=:id");
$cmd->bindValue(":id", $cb->Value);
$cmd->execute();
}
}
} else {
$koMsg = Prado::localize('Select only one item');
}
if ($koMsg !== '') {
$pBack = array('koMsg' => $koMsg);
} else {
$pBack = array('okMsg' => Prado::localize('New default template updated'));
}
$this->Response->redirect($this->Service->constructUrl('installation.template', $pBack));
}
示例2: getData
protected function getData()
{
$d = array();
$cmd = $this->db->createCommand("SELECT * FROM hr_config WHERE id=1");
$query = $cmd->query();
$data = $query->read();
$dir = $data['log_path'];
if (file_exists($dir)) {
if (!is_readable($dir)) {
$this->displayMessage(Prado::localize('The directory {dir} is not readable', array("dir" => $dir)), false);
return false;
}
} else {
$this->displayMessage(Prado::localize('The directory {dir} does not exist', array("dir" => $dir)), false);
return false;
}
$list = scandir($dir);
$i = 0;
foreach ($list as $l) {
if ($l != "." && $l != "..") {
$d[$i]['Value'] = "./horuxlog/" . $l;
$d[$i++]['Text'] = $l;
}
}
return $d;
}
示例3: displayHardwareList
public function displayHardwareList()
{
$path = './protected/pages/hardware/device/';
$files = scandir($path);
$types = array();
foreach ($files as $f) {
if ($f != '..' && $f != '.' && $f != '.svn' && is_dir($path . $f)) {
$t = explode("_", $f);
$type = $t;
unset($type[0]);
$types[$t[0]][] = implode("_", $type);
}
}
$html = '<ul id="menu-item" class="jtree">';
foreach ($types as $k => $v) {
$html .= '<li id="internal-node">';
$html .= '<div class="node-open"><span></span>';
$html .= Prado::localize("{type} technology", array('type' => $k));
$html .= '</div><ul>';
foreach ($v as $k2 => $v2) {
$html .= '<li>';
$html .= '<div class="leaf"><span></span>';
$html .= '<a href="' . $this->Service->constructUrl('hardware.device.' . $k . '_' . $v2 . '.add') . '">' . $v2 . '</a>';
$html .= '</div>';
$html .= '</li>';
}
$html .= '</ul>';
$html .= '</li>';
}
$html .= '</ul>';
return $html;
}
示例4: onLoad
public function onLoad($param)
{
$this->Page->Title = Prado::localize('Confirm');
$id = 0;
$code = "";
if (isset($_GET["id"])) {
$id = $_GET["id"];
}
if (isset($_GET["code"])) {
$code = $_GET["code"];
}
if ($id != 0 && $code != "") {
$user = TblUsers::finder()->findBy_id($id);
if ($user != null) {
if ($user->active == 1) {
$this->result->Text = Prado::localize('USER_ALREADY_ACTIVE') . " <a href='mailto:" . $this->Application->Parameters['EMAIL_ASSISTENZE'] . "'>" . Prado::localize('ASSISTENZE') . "</a>";
} else {
if ($user->confirm_code != $code) {
$this->result->Text = Prado::localize('USER_WRONG_CODE') . " <a href='mailto:" . $this->Application->Parameters['EMAIL_ASSISTENZE'] . "'>" . Prado::localize('ASSISTENZE') . "</a>";
} else {
$user->active = 1;
$user->save();
$this->result->Text = Prado::localize('ACTIVATION_OK');
}
}
} else {
$this->result->Text = Prado::localize('USER_NOT_EXIST') . " <a href='mailto:" . $this->Application->Parameters['EMAIL_ASSISTENZE'] . "'>" . Prado::localize('ASSISTENZE') . "</a>";
}
} else {
}
}
示例5: onLoad
public function onLoad($param)
{
$this->Page->Title = Prado::localize('NewCustomer');
$this->content->Visible = true;
$this->reg_ok->Visible = false;
$this->Save->ImageUrl = $this->Page->Theme->BaseUrl . '/images/' . $this->getApplication()->getGlobalization()->Culture . '/save.gif';
$this->btnCancelSelect->ImageUrl = $this->Page->Theme->BaseUrl . '/images/' . $this->getApplication()->getGlobalization()->Culture . '/cancel.gif';
if (isset($_GET["status"])) {
$this->content->Visible = false;
$this->reg_ok->Visible = true;
}
if ($this->User->UserDB->type_user_id == 4) {
$this->Save->Visible = false;
$this->btnCancelSelect->Visible = false;
} else {
$this->Save->Visible = true;
$this->btnCancelSelect->Visible = true;
}
$criteria = new TActiveRecordCriteria();
$criteria->OrdersBy['id'] = 'desc';
$classifiche = TblClassifica::finder()->findAll($criteria);
$this->DDLClassifica->DataSource = $classifiche;
$this->DDLClassifica->dataBind();
$this->DDLClassifica->SelectedValue = 1;
}
示例6: Footer
function Footer()
{
//Positionnement � 1,5 cm du bas
$this->SetY(-15);
//Police Arial italique 8
$this->SetFont('Arial', 'I', 8);
//Num�ro de page
$this->Cell(0, 10, Prado::localize('Page', array(), "messages") . ' ' . $this->PageNo(), 'T', 0, 'C');
}
示例7: onLoad
public function onLoad($param)
{
$this->Page->Title = Prado::localize('LostPassword');
$this->Send->ImageUrl = $this->Page->Theme->BaseUrl . '/images/' . $this->getApplication()->getGlobalization()->Culture . '/send.gif';
if ($this->User->UserDB->type_user_id == 4) {
$this->Send->Visible = false;
} else {
$this->Send->Visible = true;
}
}
示例8: onSave
public function onSave($sender, $param)
{
if ($this->Page->IsValid) {
if ($this->saveData()) {
$pBack = array('okMsg' => Prado::localize('The interface was added successfully'));
} else {
$pBack = array('koMsg' => Prado::localize('The interface was not added'));
}
$this->Response->redirect($this->Service->constructUrl('hardware.HardwareList', $pBack));
}
}
示例9: Checkin
protected function Checkin()
{
$cmd = NULL;
if ($this->db->DriverName == 'sqlite') {
$cmd = $this->db->createCommand("select * from sqlite_master");
} else {
$cmd = $this->db->createCommand("SHOW TABLE STATUS");
}
$data = $cmd->query();
$data = $data->readAll();
$tables = array();
foreach ($data as $d) {
$cmd = NULL;
if ($this->db->DriverName == 'sqlite') {
$cmd = $this->db->createCommand("pragma table_info('" . $d['name'] . "')");
$data3 = $cmd->query();
$data3 = $data3->readAll();
$data2 = false;
if ($data3) {
foreach ($data3 as $data4) {
if ($data4['name'] == 'locked') {
$data2 = true;
}
}
}
} else {
$cmd = $this->db->createCommand("SHOW COLUMNS FROM " . $d['Name'] . " WHERE Field='locked'");
$data2 = $cmd->query();
$data2 = $data2->read();
}
if ($data2) {
if ($this->db->DriverName == 'sqlite') {
$cmd = $this->db->createCommand("SELECT COUNT(*) AS nb FROM " . $d['name'] . " WHERE locked>0");
} else {
$cmd = $this->db->createCommand("SELECT COUNT(*) AS nb FROM " . $d['Name'] . " WHERE locked>0");
}
$data2 = $cmd->query();
$data2 = $data2->read();
if ($this->db->DriverName == 'sqlite') {
$cmd = $this->db->createCommand("UPDATE " . $d['name'] . " SET locked=0");
} else {
$cmd = $this->db->createCommand("UPDATE " . $d['Name'] . " SET locked=0");
}
$cmd->execute();
if ($this->db->DriverName == 'sqlite') {
$tables[] = array('name' => $d['name'], 'item' => Prado::localize('Checked in {n} Items', array('n' => $data2['nb'])));
} else {
$tables[] = array('name' => $d['Name'], 'item' => Prado::localize('Checked in {n} Items', array('n' => $data2['nb'])));
}
}
}
$this->DataGrid->DataSource = $tables;
$this->DataGrid->dataBind();
}
示例10: onSave
public function onSave($sender, $param)
{
if ($this->Page->IsValid) {
if ($this->saveData()) {
$pBack = array('okMsg' => Prado::localize('The attribution was modified successfully'), 'id' => $this->Request['userid']);
} else {
$pBack = array('koMsg' => Prado::localize('The attribution was not modified'), 'id' => $this->Request['userid']);
}
$this->Response->redirect($this->Service->constructUrl('components.velopark.attribution', $pBack));
}
}
示例11: getData
public function getData()
{
$cmd = $this->db->createCommand("SELECT * FROM hr_install WHERE type='language'");
$data = $cmd->query();
$data = $data->readAll();
$l[] = array('param' => 'default', 'name' => Prado::localize('default'));
foreach ($data as $d) {
$l[] = array('param' => $d['param'], 'name' => $d['name']);
}
return $l;
}
示例12: onLoad
public function onLoad($param)
{
$this->Page->Title = Prado::localize('Register');
$this->content->Visible = true;
$this->reg_ok->Visible = false;
$this->Save->ImageUrl = $this->Page->Theme->BaseUrl . '/images/' . $this->getApplication()->getGlobalization()->Culture . '/save.gif';
if (isset($_GET["status"])) {
$this->content->Visible = false;
$this->reg_ok->Visible = true;
}
}
示例13: onSave
public function onSave($sender, $param)
{
if ($this->Page->IsValid) {
$res = $this->saveData();
if ($res) {
$pBack = array('okMsg' => Prado::localize('The config was modified successfully'));
} else {
$pBack = array('koMsg' => Prado::localize('The config was not modified') . $this->emailError);
}
$this->Response->redirect($this->Service->constructUrl('components.timuxadmin.config.config', $pBack));
}
}
示例14: onApply
public function onApply($sender, $param)
{
if ($this->Page->IsValid) {
if ($lastId = $this->saveData()) {
$pBack = array('okMsg' => Prado::localize('The leave was add successfully'), 'id' => $lastId);
$this->Response->redirect($this->Service->constructUrl('components.timuxuser.leave.mod', $pBack));
} else {
$pBack = array('koMsg' => Prado::localize('The leave was not add'), 'id' => $this->id->Value);
$this->Response->redirect($this->Service->constructUrl('components.timuxuser.leave.add', $pBack));
}
}
}
示例15: onSave
public function onSave($sender, $param)
{
if ($this->Page->IsValid) {
if ($this->saveData()) {
$pBack = array('okMsg' => Prado::localize('The subscription was modified successfully'));
} else {
$pBack = array('koMsg' => Prado::localize('The subscription was not modified'));
}
$this->blockRecord('hr_vp_subscription', $this->id->Value, 0);
$this->Response->redirect($this->Service->constructUrl('components.velopark.subscription', $pBack));
}
}