本文整理汇总了PHP中get_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP get_msg函数的具体用法?PHP get_msg怎么用?PHP get_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_msg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_exchange
function get_exchange($imap_box)
{
$emails = imap_search($imap_box, "FROM 'e-mail address'");
//ищем письма от
//$emails = imap_search($imap_box, "FROM 'e-mail address'"); //ищем письма от
//echo "<br>";
//if ($emails) echo "Найдено:" . sizeof($emails) . " писем.<br>"; // сколько нашли и какие их номера начиная с 0
//else echo "Писем удовлетворяющих условию не найдено.";
$result = false;
if ($emails) {
/* put the newest emails on top */
rsort($emails);
/* for every email... */
foreach ($emails as $email_number) {
$message = get_msg($imap_box, $email_number, "PLAIN");
// PLAIN or HTML or ...
$message = preg_replace('/\\r\\n|\\r|\\n/u', '', $message);
// удаляем символы перевода строки
preg_match("/Курс виписки рахунків- \\d\\d\\,\\d\\dГотівковий- \\d\\d\\,\\d\\d/", $message, $output_array);
//ищем паттерн
if ($output_array[0]) {
// Если нашли паттерн
if (!$result) {
preg_match_all('/\\d\\d\\,\\d\\d/', $output_array[0], $result);
}
//нашли свежак и сохраняем его
imap_delete($imap_box, $email_number);
//помечаем письмо на удаление
}
}
}
imap_expunge($imap_box);
return $result[0];
}
开发者ID:qwant50,项目名称:email-s-parser,代码行数:34,代码来源:get_exchange_v2.1.php
示例2: init
/**
* Set the User geolocation and page
*/
function init($link = null, $id = null, $online_time = USER_ONLINE_TIME)
{
$file = basename($_SERVER['SCRIPT_FILENAME']);
$url = $_SERVER['REQUEST_URI'];
$user_localization = isset($_SESSION['user_localization']) ? $_SESSION['user_localization'] : null;
$sid = session_id();
$browser = BROWSER . " " . BROWSER_VERSION;
$os = BROWSER_OS;
$ip = IP;
if (!$user_localization) {
$time = TIME - HOUR;
DB::query("DELETE FROM " . DB_PREFIX . "user_localization WHERE time < " . HOUR);
}
$user_localization_id = $user_localization ? $_SESSION['user_localization']['user_localization_id'] : DB::get_field("SELECT user_localization_id FROM " . DB_PREFIX . "user_localization WHERE sid='{$sid}'");
if ($user_id = User::get_user_id()) {
$guest_id = 0;
$name = User::get_user_field("name");
} else {
$guest_id = isset($user_localization['guest_id']) ? $user_localization['guest_id'] : 1 + DB::get_field("SELECT guest_id FROM " . DB_PREFIX . "user_localization ORDER BY guest_id DESC LIMIT 1;");
$name = get_msg('guest') . " " . $guest_id;
}
if ($user_localization_id) {
DB::query("UPDATE " . DB_PREFIX . "user_localization SET ip='{$ip}', user_id='{$user_id}', name='{$name}', url='{$url}', id='{$id}', file='{$file}', time='" . TIME . "', sid='{$sid}' WHERE user_localization_id='{$user_localization_id}'");
} else {
if (!($location = ip_to_location($ip, $assoc = true))) {
$location = array('CountryCode' => null, 'CountryName' => null, 'RegionCode' => null, 'RegionName' => null, 'City' => null, 'ZipPostalCode' => null, 'Latitude' => null, 'Longitude' => null, 'TimezoneName' => null, 'Gmtoffset' => null);
}
//replace_sql_injection( $location );
DB::query("INSERT INTO " . DB_PREFIX . "user_localization\r\n (ip,sid,user_id,guest_id,name,url,id,file,os,browser,time,time_first_click,country_code,country_name,region_code,region_name,city_name,zip,latitude,longitude,timezone_name,gmt_offset)\r\n VALUES\r\n ('{$ip}','{$sid}','{$user_id}','{$guest_id}','{$name}','{$url}','{$id}','{$file}','{$os}','{$browser}', " . TIME . ", " . TIME . ", '{$location['CountryCode']}', '{$location['CountryName']}', '{$location['RegionCode']}', '{$location['RegionName']}','{$location['City']}', '{$location['ZipPostalCode']}', '{$location['Latitude']}', '{$location['Longitude']}', '{$location['TimezoneName']}', '{$location['Gmtoffset']}')");
$user_localization_id = DB::get_last_id();
}
$_SESSION['user_localization'] = array('user_localization_id' => $user_localization_id, 'id' => $id, 'guest_id' => $guest_id, 'name' => $name, 'time' => TIME, 'file' => $file, 'user_id' => $user_id, 'os' => $os, 'browser' => $browser);
}
开发者ID:jffuchs,项目名称:rainframework,代码行数:36,代码来源:Rain_User_Localization.php
示例3: time_elapsed
/**
* 格式化日期 e.g. 3 days ago, or 5 minutes ago to a maximum of a week ago
*
* @param int $time unix timestamp
* @param string format of time (use the constant fdate_format or ftime_format)
*/
function time_elapsed($time = null, $format)
{
$diff = TIME - $time;
if ($diff < MINUTE) {
return $diff . " " . get_msg('seconds_ago');
} elseif ($diff < HOUR) {
return ceil($diff / 60) . " " . get_msg('minutes_ago');
} elseif ($diff < 12 * HOUR) {
return ceil($diff / 3600) . " " . get_msg('hours_ago');
} elseif ($diff < DAY) {
return get_msg('today') . " " . strftime(TIME_FORMAT, $time);
} elseif ($diff < DAY * 2) {
return get_msg('yesterday') . " " . strftime(TIME_FORMAT, $time);
} elseif ($diff < WEEK) {
return ceil($diff / DAY) . " " . get_msg('days_ago') . " " . strftime(TIME_FORMAT, $time);
} else {
return strftime($format, $time);
}
}
开发者ID:h1soft,项目名称:h,代码行数:25,代码来源:Formater.php
示例4: drop
function drop()
{
if (!IS_POST) {
$this->display('goods.batch.html');
} else {
$id = isset($_POST['id']) ? trim($_POST['id']) : '';
if (!$id) {
$this->show_warning('Hacking Attempt');
return;
}
$ids = explode(',', $id);
// notify store owner
$ms =& ms();
$goods_list = $this->_goods_mod->find(array("conditions" => $ids, "fields" => "goods_name, store_id"));
foreach ($goods_list as $goods) {
//$content = sprintf(LANG::get('toseller_goods_droped_notify'), );
$content = get_msg('toseller_goods_droped_notify', array('reason' => trim($_POST['drop_reason']), 'goods_name' => addslashes($goods['goods_name'])));
$ms->pm->send(MSG_SYSTEM, $goods['store_id'], '', $content);
}
// drop
$this->_goods_mod->drop_data($ids);
$this->_goods_mod->drop($ids);
$ret_page = isset($_GET['ret_page']) ? intval($_GET['ret_page']) : 1;
$this->show_message('drop_ok', 'back_list', 'index.php?app=goods&page=' . $ret_page);
}
}
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:26,代码来源:goods.app.php
示例5: cancel
function cancel()
{
$id = empty($_GET['id']) ? 0 : $_GET['id'];
if (!$id) {
$this->show_warning('no_such_groupbuy');
return false;
}
if (!$this->_ican($id, ACT)) {
$this->show_warning('Hacking Attempt');
return;
}
/* 团购信息 */
$group = $this->_groupbuy_mod->get(array('conditions' => 'group_id=' . $id, 'fields' => 'group_desc,group_name,owner_name', 'join' => 'belong_store'));
if (!IS_POST) {
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('groupbuy_manage'), 'index.php?app=seller_groupbuy', LANG::get('cancel_groupbuy'));
/* 当前用户中心菜单 */
$this->_curitem('groupbuy_manage');
/* 当前所处子菜单 */
$this->_curmenu('cancel_groupbuy');
$this->assign('group', $group);
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('desc_groupbuy'));
$this->display('seller_groupbuy.cancel.html');
} else {
if (!$this->_groupbuy_mod->edit($id, array('state' => GROUP_CANCELED))) {
$this->show_warning($this->_groupbuy_mod->get_error());
return;
}
$content = get_msg('tobuyer_groupbuy_cancel_notify', array('reason' => $_POST['reason'], 'url' => SITE_URL . '/' . url("app=groupbuy&id={$id}")));
$this->_groupbuy_mod->sys_notice($id, array('admin', 'buyer'), '', $content, array('msg'));
$this->show_message('cancel_ok', 'back_list', 'index.php?app=seller_groupbuy');
}
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:33,代码来源:seller_groupbuy.app.php
示例6: switch
switch ($status) {
case 'Open':
echo "<h1>Open Orders</h1>";
myOrders('Open', $custID);
break;
case 'Closed':
echo "<h1>Past Orders</h1>";
myOrders('Closed', $custID);
break;
}
}
if (isset($_GET['orderID']) && !isset($_GET['noOrders'])) {
$orderID = $_GET['orderID'];
$db->runQuery("select CL.id, CL.date,L.description, L.status, L.type, E.first_name as 'employee_first_name',\r E.last_name as 'employee_last_name',E.email as 'employee_email' from customer_leads CL, leads L, employees E\r where CL.id = {$orderID} and\r CL.employee_id = E.id and L.id = CL.id;");
$rows = $db->result->fetch_object();
$pdata = json_encode($rows);
}
if (isset($_GET['noOrders'])) {
echo "<h2>You donot have any orders yet.</h2>";
}
?>
<div id="profileBox"></div>
<script type="text/javascript">
showMsg('<?php
get_msg();
?>
');
var pdata = <?php
echo $pdata;
开发者ID:bajmhunter,项目名称:pcrs,代码行数:31,代码来源:myOrders.php
示例7: sec_to_string
/**
* Convert seconds to string, eg. "2 minutes", "1 hour", "16 seconds"
*/
function sec_to_string($sec)
{
$str = null;
if ($hours = intval(intval($sec) / 3600)) {
$str .= $hours > 1 ? $hours . " " . get_msg('hours') : $hours . " " . get_msg('hour');
}
if ($minutes = intval($sec / 60 % 60)) {
$str .= $minutes > 1 ? $minutes . " " . get_msg('minutes') : $minutes . " " . get_msg('minute');
}
if ($seconds = intval($sec % 60)) {
$str .= $seconds > 1 ? $seconds . " " . get_msg('seconds') : $seconds . " " . get_msg('second');
}
return $str;
}
开发者ID:jffuchs,项目名称:rainframework,代码行数:17,代码来源:functions.php
示例8: get_user
function get_user($user_id = null)
{
if ($user_id) {
$user = DB::get_row("SELECT * FROM " . DB_PREFIX . "user WHERE user_id = '{$user_id}'");
$user['level'] = get_msg(strtolower($GLOBALS['user_level'][$user['status']]));
return $user;
} else {
return isset(self::$user) ? self::$user : null;
}
}
开发者ID:jffuchs,项目名称:rainframework,代码行数:10,代码来源:Rain_User.php
示例9: ld_msg
function ld_msg($msg_code = 'err_000', $param = '')
{
static $_language_item = array();
if (!isset($_language_item[$msg_code])) {
$msg =& get_msg();
if (!isset($msg[$msg_code])) {
show_error("Your language file does not appear to be formatted correctly.");
}
$_language_item[$msg_code] = $msg[$msg_code];
}
return str_replace('{%s}', $param, $_language_item[$msg_code]);
}
开发者ID:puncoz,项目名称:presentation,代码行数:12,代码来源:functions.php
示例10: _draw_page_not_found
/**
* Page was not found
*
* @param string $msg, message for the page not found
*/
protected function _draw_page_not_found($msg = "page_not_found")
{
header("HTTP/1.0 404 Not Found");
$this->page_layout = $this->not_found_layout;
$this->assign("message", get_msg($msg));
$this->draw();
die;
}
开发者ID:jffuchs,项目名称:rainframework,代码行数:13,代码来源:Loader.php
示例11: switch
}
switch ($tela) {
case 'gerenciar':
?>
<div class="twelve columns">
<script type="text/javascript">
$(function(){
$('.deletareg').click(function(){
if(confirm("Deseja Realmente excluir este registro?\nEsta Operação não poderá ser desfeita!"))return true; else return false;
});
});
</script>
<?php
echo breadcrumb();
get_msg('msgok');
get_msg('msgerro');
$modo = $this->uri->segment(3);
if ($modo == 'all') {
$limit = 0;
} else {
$limit = 50;
echo '<p>Mostrando os últimos 50 registros, para ver todo o histórico ' . anchor('auditoria/gerenciar/all', 'Clique aqui') . ' </p>';
}
?>
<table class="twelve data-table">
<thead>
<tr>
<th>Usuário</th>
<th>Data e Hora</th>
<th>Operação</th>
开发者ID:jeffersoncarrenho,项目名称:painelci,代码行数:31,代码来源:auditoria.php
示例12: switch
}
switch ($tela) {
case 'cadastrar':
echo bt_row(array(form_open_multipart('midia/cadastrar'), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(12, bt_input('Titulo midia', 'nome', 4)), bt_col(12, bt_input('Descrição', 'descricao', 2)), bt_col(12, bt_input('Alt', 'alt', 2)), bt_col(12, bt_form(12, array(form_label('Arquivo'), form_upload(array('name' => 'arquivo'), set_value('arquivo'))))), bt_col(12, array(anchor('midia/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'cadastrar', 4, 3))), form_fieldset_close(), form_close()));
break;
case 'editar':
$id = $this->uri->segment(3);
if ($id == NULL) {
set_msg('msgerro', 'Não foi informado uma midia valido.', 'aviso');
redirect('midia/gerenciar');
}
$query = $this->midia->get_byid($id)->row();
echo bt_row(array(form_open(current_url()), form_fieldset(), bt_col(12, array(get_msg('msgok'), get_msg('msgerro'), erros_validacao())), bt_col(6, array(bt_col(12, bt_input_cont('Titulo midia', 'nome', 12, $query->nome)), bt_col(12, bt_input_cont('Descrição', 'descricao', 12, $query->descricao)), bt_col(12, bt_input_cont('Alt', 'alt', 12, $query->alt)), bt_col(12, array(anchor('midia/gerenciar', 'Canselar', array('class' => 'btn btn-danger espaco')), bt_submit('Salvar', 'cadastrar', 4, 3))))), bt_col(6, trumb($query->arquivo, 300, 250, TRUE, $query->alt)), form_hidden('id', $id), form_fieldset_close(), form_close()));
break;
case 'gerenciar':
bt_row(bt_col(12, array(get_msg('msgok'), get_msg('msgerro'))));
?>
<div class="table-responsive">
<table class="table table-hover table-striped data-table">
<thead>
<tr>
<th>Nome<i class="fa"></i></th>
<th>Link<i class="fa"></i></th>
<th>Miniaturar<i class="fa"></i></th>
<th class="text-center">Ação<i class="fa"></i></th>
</tr>
</thead>
<?php
$query = $this->midia->get_all()->result();
开发者ID:jairomr,项目名称:Painel-Admin,代码行数:31,代码来源:midia.php
示例13: _update_store_state
function _update_store_state()
{
$store_mod =& m('store');
$stores = $store_mod->find(array('conditions' => "state = '" . STORE_OPEN . "' AND end_time > 0 AND end_time < '" . gmtime() . "'", 'join' => 'belongs_to_user', 'fields' => 'store_id, user_id, user_name, email'));
foreach ($stores as $store) {
$subject = Lang::get('close_store_notice');
$content = get_msg('toseller_store_closed_notify', array('reason' => Lang::get('close_reason')));
/* 连接用户系统 */
$ms =& ms();
$ms->pm->send(MSG_SYSTEM, $store['user_id'], '', $content);
$this->_mailto($store['email'], $subject, $content);
$store_mod->edit($store['store_id'], array('state' => STORE_CLOSED, 'close_reason' => Lang::get('close_reason')));
}
}
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:14,代码来源:default.app.php
示例14: index
function index()
{
$id = empty($_GET['id']) ? 0 : intval($_GET['id']);
if (!$id) {
$this->show_warning('no_such_groupbuy');
return false;
}
// 团购信息
$group = $this->_groupbuy_mod->get(array('conditions' => 'group_id=' . $id . ' AND gb.state<>' . GROUP_PENDING, 'join' => 'belong_store', 'fields' => 'gb.*,s.owner_name'));
if (empty($group)) {
$this->show_warning('no_such_groupbuy');
return;
}
// 团购商品信息
$goods = $this->_query_goods_info($group['goods_id']);
if ($goods['closed'] == 1) {
$this->show_warning('groupbuy_goods_closed');
return;
}
if (!IS_POST) {
$data['views'] = $group['views'] + 1;
// 浏览数
if ($group['end_time'] < gmtime() && $group['state'] == GROUP_ON) {
$group['state'] = GROUP_END;
// 结束团购
/* 通知卖家 */
$content = get_msg('toseller_groupbuy_end_notify', array('cancel_days' => GROUP_CANCEL_INTERVAL));
$this->_groupbuy_mod->sys_notice($id, array('seller'), '', $content, array('msg'));
} else {
if ($group['end_time'] + GROUP_CANCEL_INTERVAL * 3600 * 24 < gmtime() && $group['state'] == GROUP_END) {
$group['state'] = GROUP_CANCELED;
// 取消团购
/* 通知买家和站长 */
$content = get_msg('tobuyer_group_auto_cancel_notify', array('cancel_days' => GROUP_CANCEL_INTERVAL, 'url' => SITE_URL . '/' . url("app=groupbuy&id={$id}")));
$this->_groupbuy_mod->sys_notice($id, array('admin', 'buyer'), '', $content, array('msg'));
}
}
$data['state'] = $group['state'];
$this->_groupbuy_mod->edit($id, $data);
// 订购数
$group['quantity'] = $this->_groupbuy_mod->get_join_quantity($id);
// 进度
$group['left_quantity'] = $group['min_quantity'] - $group['quantity'];
$group['left_per'] = 100 - intval(100 * $group['quantity'] / $group['min_quantity']);
$group['left_per'] < 0 && ($group['left_per'] = 0);
// 状态描述
$group['state_desc'] = $this->_get_state_desc($group['state'], $group['end_time']);
// 团购规格价格
$group['spec_price'] = unserialize($group['spec_price']);
// 可执行操作
$group['ican'] = $this->_ican($group['group_id'], $group['state'], $group['store_id']);
// 参团记录
$join_list = $this->_groupbuy_mod->get_join_list($id);
foreach ($goods['_specs'] as $key => $spec) {
if (empty($group['spec_price'][$spec['spec_id']])) {
unset($goods['_specs'][$key]);
} else {
$goods['_specs'][$key]['group_price'] = $group['spec_price'][$spec['spec_id']]['price'];
if (isset($join_list[$this->_visitor['user_id']])) {
$goods['_specs'][$key]['my_qty'] = $join_list[$this->_visitor['user_id']]['spec_quantity'][$spec['spec_id']]['qty'];
}
}
}
// 店铺信息
$this->set_store($goods['store_id']);
$store = $this->get_store_data();
// 当前位置
$this->_curlocal(array(array('text' => Lang::get('groupbuy'), 'url' => url('app=search&act=groupbuy')), array('text' => $group['group_name'])));
// 团购咨询数据
$data = $this->_get_groupbuy_qa($id);
if (Conf::get('captcha_status.goodsqa')) {
$this->assign('captcha', 1);
}
$this->assign('email', $data['email']);
$this->assign('page_info', $data['page_info']);
$this->assign('qa_info', $data['qa_info']);
/* 页面标题 */
$this->_config_seo('title', $group['group_name'] . ' - ' . Lang::get('groupbuy') . ' - ' . Conf::get('site_title'));
$this->_import_resource();
$this->assign('store', $store);
$this->assign('goods', $goods);
$this->assign('group', $group);
$this->assign('guest_comment_enable', Conf::get('guest_comment'));
$this->assign('join_list', $join_list);
$this->display('groupbuy.index.html');
} else {
if (isset($_POST['join'])) {
$quantity = 0;
$spec_quantity = array();
foreach ($_POST['quantity'] as $key => $val) {
if ($_POST['quantity'][$key] > 0) {
$spec_quantity[$_POST['spec_id'][$key]] = array('spec' => $_POST['spec'][$key], 'qty' => $_POST['quantity'][$key]);
$quantity += $_POST['quantity'][$key];
} elseif ($_POST['quantity'][$key] != '') {
$this->show_warning('invalid_quantity');
return;
}
}
if ($quantity == 0) {
$this->show_warning('fill_quantity');
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:101,代码来源:groupbuy.app.php
示例15: form_open
<div class="row">
<?php
echo '<div class="small-4 small-centered large-4 columns large-centered">';
echo form_open('usuarios/login', array('class' => 'custom login-form'));
echo form_fieldset('Identifique-se');
erros_validacao();
get_msg('logoffok');
get_msg('errologin');
echo form_label('Usuário');
echo form_input(array('name' => 'usuario'), set_value('usuario'), 'autofocus');
echo form_label('Senha');
echo form_password(array('name' => 'senha'), set_value('senha'));
echo form_hidden('redirect', $this->session->userdata('redir_para'));
echo form_submit(array('name' => 'logar', 'class' => 'button radius right'), 'Login');
echo "<p>" . anchor('usuarios/nova_senha', 'Esqueci minha senha') . '<p>';
echo form_fieldset_close();
echo form_close();
echo "</div>";
?>
</div>
开发者ID:glhrmfrts2,项目名称:Loja_Beit,代码行数:20,代码来源:login.php
示例16: date
$img->set_width($pic_width);
//決定縮圖大小,大圖大小
$img->set_savepath("../images/" . date("Y-m-d"));
//設定儲存路徑
$pic2 = $img->save();
} else {
$pic2 = $_POST['pic2'];
}
if ($check == 'upd') {
$unit->table = $pro_class_table;
$unit->get_vars();
$unit->pic = $pic;
$unit->pic2 = $pic2;
$buff = array();
$unit->get_history($unit->upid, $buff);
$unit->upd();
$tool->show(get_msg("upd_success"), $_SERVER['HTTP_REFERER']);
exit;
}
if (isset($_POST['del'])) {
$id = $_POST['id'];
for ($i = 0; $i < count($id); $i++) {
del_child($id[$i]);
}
if (count($id) > 0) {
$tool->show(get_msg("del_success"), $_SERVER['HTTP_REFERER']);
} else {
$tool->error(get_msg("del_fail"));
}
exit;
}
开发者ID:jcandrew1966,项目名称:as_woodhouse,代码行数:31,代码来源:class_process.php
示例17: init_variable
protected function init_variable()
{
$this->THEMEVARS = array();
$this->THEMEVARS['is_home'] = $this->is_home;
$this->THEMEVARS['base_url'] = _URL;
$this->THEMEVARS['theme_url'] = $this->theme_url;
$this->THEMEVARS['logo_url'] = $this->meta->logo();
$this->THEMEVARS['config'] = (array) $this->meta->sys_config;
$this->THEMEVARS['meta'] = $this->meta->get_meta();
$this->THEMEVARS['breadcrumb'] = $this->meta->breadcrumb_trail;
$this->THEMEVARS['copyright'] = str_replace("[year]", date('Y'), $this->meta->sys_config->copyright);
$this->THEMEVARS['notification'] = get_msg(true);
$this->init_blocks();
if (isset($_GET['_d_x_'])) {
pr($this->THEMEVARS);
die;
}
}
开发者ID:unregister,项目名称:tutupgelas,代码行数:18,代码来源:MY_Controller.php
示例18: view
function view()
{
$id = empty($_GET['id']) ? 0 : intval($_GET['id']);
if (!IS_POST) {
/* 是否存在 */
$store = $this->_store_mod->get_info($id);
if (!$store) {
$this->show_warning('Hacking Attempt');
return;
}
$sgrade_mod =& m('sgrade');
$sgrades = $sgrade_mod->get_options();
$store['sgrade'] = $sgrades[$store['sgrade']];
$this->assign('store', $store);
$scates = $this->_store_mod->getRelatedData('has_scategory', $id);
$this->assign('scates', $scates);
$this->display('store.view.html');
} else {
$ret_page = isset($_GET['ret_page']) ? intval($_GET['ret_page']) : 1;
/* 批准 */
if (isset($_POST['agree'])) {
$this->_store_mod->edit($id, array('state' => STORE_OPEN, 'add_time' => gmtime(), 'sort_order' => 65535));
$content = get_msg('toseller_store_passed_notify');
$ms =& ms();
$ms->pm->send(MSG_SYSTEM, $id, '', $content);
$store_info = $this->_store_mod->get_info($id);
$this->send_feed('store_created', array('user_id' => $store_info['store_id'], 'user_name' => $store_info['user_name'], 'store_url' => SITE_URL . '/' . url('app=store&id=' . $store_info['store_id']), 'seller_name' => $store_info['store_name']));
$this->_hook('after_opening', array('user_id' => $id));
$this->show_message('agree_ok', 'edit_the_store', 'index.php?app=store&act=edit&id=' . $id, 'back_list', 'index.php?app=store&wait_verify=1&page=' . $ret_page);
} elseif (isset($_POST['reject'])) {
$reject_reason = trim($_POST['reject_reason']);
if (!$reject_reason) {
$this->show_warning('input_reason');
return;
}
$content = get_msg('toseller_store_refused_notify', array('reason' => $reject_reason));
$ms =& ms();
$ms->pm->send(MSG_SYSTEM, $id, '', $content);
$this->_drop_store_image($id);
// 注意这里要先删除图片,再删除店铺,因为删除图片时要查店铺信息
$this->_store_mod->drop($id);
$this->show_message('reject_ok', 'back_list', 'index.php?app=store&wait_verify=1&page=' . $ret_page);
} else {
$this->show_warning('Hacking Attempt');
return;
}
}
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:48,代码来源:store.app.php
示例19: get_msg
<?php
require 'db.php';
require 'chat.func.php';
$messages = get_msg();
foreach ($messages as $message) {
echo '<strong>' . $message['sender'] . ' Sent:</strong><br />';
echo $message['message'] . '<br /><br />';
}
开发者ID:TexnologiaLog,项目名称:SnapChatApp,代码行数:9,代码来源:messages.php
示例20: function
$('.deletareg').click(function(){
if(confirm("deseja realmente excluir esse registro?\nEsta operação não poderá ser desfeita!"))return true;else return false;
});
$('.link').on('click', function(){
$(this).select();
});
})
</script>
<p class="breadcrumb"><?php
echo breadcrumb();
?>
</p>
<div class="large-12 columns">
<?php
get_msg('msgok');
get_msg('msgerror');
?>
<table class="large-12 data-table">
<thead>
<tr>
<th>Foto</th>
<th>Nome</th>
<th>categoria</th>
<th class="tex-center">Ações</th>
</tr>
</thead>
<tbody>
<?php
foreach ($query as $data) {
echo "<tr>";
开发者ID:glhrmfrts2,项目名称:Loja_Beit,代码行数:31,代码来源:gerenciar.php
注:本文中的get_msg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论