本文整理汇总了PHP中success_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP success_msg函数的具体用法?PHP success_msg怎么用?PHP success_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了success_msg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit_pass
public function edit_pass()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('current_pass', 'Clave Actual', 'trim|required|xss_clean');
$this->form_validation->set_rules('new_pass', 'Nueva Clave', 'trim|required|xss_clean');
$this->form_validation->set_rules('confirm_pass', 'Confirme Nueva Clave', 'trim|required|xss_clean');
$this->form_validation->set_error_delimiters('<br /><span class="text-danger">', '</span>');
$form_validation = $this->form_validation->run();
if ($form_validation == FALSE) {
$this->res_message = validation_errors();
// echo tagcontent('script', "window.location.replace('". base_url('user_conf/editprofile/index')."')");
} else {
$form_validation2 = $this->check_current_pass();
$form_validation = $this->confirm_pass();
if ($form_validation and $form_validation2) {
$data_set = array('clave' => md5(set_value('new_pass') . get_settings('PASSWORDSALTMAIN')));
$res = $this->generic_model->update('billing_empleado', $data_set, array('id' => $this->user->id));
if ($res) {
$this->res_message .= success_msg(', clave actualizada.');
}
} else {
$this->res_message .= validation_errors();
}
}
echo $this->res_message;
}
示例2: foreach
foreach ($needles as $needle) {
if (!(strpos($haystack, $needle) === false)) {
$found = 1;
break;
}
}
if ($found == 1) {
die("Upload not permitted");
} else {
if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
$uid = $CURUSER['uid'];
@chmod("{$THIS_BASEPATH}/{$target_path}", 0777);
}
}
mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO `{$TABLE_PREFIX}subtitles` (`id`, `name`, `hash`, `file`, `imdb`, `pic`, `Framerate`, `cds`, `uploader`, `downloaded`, `author`, `flag`) VALUES ('', '{$nume}', '{$hash}', '{$x}', '{$link}', '{$pic}', '{$frame}', '{$cds}', {$uid}, 0, '{$autor}',{$idflag}); ") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
success_msg("Success", "The subtitle was added to the database!<br><a href=index.php?page=subtitles>Back To Subtitles!</a>");
stdfoot(false, false, true);
die;
} else {
stderr("Error", "There was an error while uploading, please try again!");
stdfoot(false, false, true);
die;
}
} else {
$fres = flag_list();
$option = "\n<select name=\"flag\" size=\"1\">\n<option value='0'>---</option>";
$thisip = $_SERVER["REMOTE_ADDR"];
$remotedns = gethostbyaddr($thisip);
if ($remotedns != $thisip) {
$remotedns = strtoupper($remotedns);
preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
示例3: stderr
if ($del > 0) {
stderr("Confirm", "<b>Are you sure you wish to delete the team? ({$team}) ( <b><a href='index.php?page=admin&user={$CURUSER['uid']}&code={$CURUSER['random']}&do=teams&del={$del}&team={$team}&sure=yes'>Yes!</a></b> / <b><a href='index.php?page=admin&user={$CURUSER['uid']}&code={$CURUSER['random']}&do=teams'>No!</a></b> )");
stdfoot();
exit;
}
//$admintpl->set("sure",$sure);
//Edit Team
if ($edited == 1) {
$aa = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT id FROM {$TABLE_PREFIX}users WHERE username='{$teamownername}'");
$ar = mysqli_fetch_assoc($aa);
$team_owner = $ar["id"];
$query = "UPDATE {$TABLE_PREFIX}teams SET\tname = '{$team_name}', info = '{$team_info}', owner = '{$team_owner}', image = '{$team_image}' WHERE id=" . sqlesc($id);
$sql = mysqli_query($GLOBALS["___mysqli_ston"], $query);
mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE {$TABLE_PREFIX}users SET team = '{$id}' WHERE id= '{$team_owner}'");
if ($sql) {
success_msg("Success", "Updated Team!<br><a href=\"index.php?page=admin&user={$CURUSER['uid']}&code={$CURUSER['random']}&do=teams\">Back</a>");
write_log("has edited team ({$team_name})", "edit");
stdfoot();
exit;
}
}
$edity = textbbcode("smolf3d1", "team_info", $info);
if ($editid > 0) {
$editt = "<form name='smolf3d1' method='get' action='index.php'>\n\t<CENTER><table cellspacing=0 cellpadding=5 width=50%>\n\t<div align='center'><input type='hidden' name='edited' value='1'></div>\n\t<br>\n <input type='hidden' name='page' value='admin'>\n <input type='hidden' name='user' value='{$CURUSER['uid']}'>\n <input type='hidden' name='code' value='{$CURUSER['random']}'>\n <input type='hidden' name='do' value='teams'>\n <input type='hidden' name='id' value='{$editid}'><table class=main cellspacing=0 cellpadding=5 width=50%><tr>\n <td class=header colspan=2 align=center>" . $language['TEAM_EDIT'] . "</td></tr>\n\t<tr><td class=header>" . $language['TEAM_NAME'] . "</td><td align='right' class=lista><input type='text' size=50 name='team_name' value='{$name}'></td></tr>\n\t<tr><td class=header>" . $language['TEAM_LOGO'] . "</td><td align='right' class=lista><input type='text' size=50 name='team_image' value='{$image}'></td></tr>\n\t<tr><td class=header>" . $language['TEAM_OWNER'] . "</td><td align='right' class=lista><input type='text' size=50 name='team_owner' value='{$owner}'>" . $language['TEAM_ONE'] . "</td></tr>\n\t<tr><td valign=top class=header>" . $language['TEAM_DESC'] . "</td><td align='right' class=lista>{$edity}</td></tr>\n\t<tr><td class=header colspan=2><div align='center'><input type='Submit' value=Update></div></td></tr>\n\t</table></CENTER></form><br><br><hr><br><br>";
}
$admintpl->set("edit", $editt);
//Add Team
if ($add == 'true') {
$ping = do_sqlquery("select * from {$TABLE_PREFIX}teams order by name");
while ($pong = mysqli_fetch_array($ping)) {
if ($pong["name"] == $team_name) {
示例4: simplexml_load_file
if ($action == "edit") {
$isbool = false;
if (file_exists('../configs/web.xml')) {
$xml = simplexml_load_file('../configs/web.xml');
foreach ($xml->xpath("/web/info/add") as $val) {
$val['value'] = $_POST['' . $val['filed'] . ''];
}
$xml->saveXML('../configs/web.xml');
$isbool = true;
} else {
info_sysadmin_error('读取站点配置文件失败');
}
if ($isbool) {
success_msg('修改成功', prev_url());
} else {
success_msg('修改失败', 'back');
}
}
if ($action == '') {
if (file_exists('../configs/web.xml')) {
$webinfo = array();
$xml = simplexml_load_file('../configs/web.xml');
foreach ($xml->xpath('/web/info/add') as $value) {
$webinfo[] = $value;
}
$smarty->assign('webinfo', $webinfo);
} else {
info_sysadmin_error('读取站点配置文件失败');
}
}
$smarty->assign("action", $action);
示例5: die
die("non direct access!");
}
include load_language("lang_peers.php");
$admintpl->set('language', $language);
isset($_GET["id"]) ? $id = 0 + $_GET["id"] : ($id = "");
isset($_GET["returnto"]) ? $url = urldecode($_GET["returnto"]) : ($url = "");
isset($_POST["confirm"]) ? $confirm = $_POST["confirm"] : ($confirm = "");
if ($_POST["confirm"]) {
if ($confirm == $language["YES"]) {
if ($XBTT_USE) {
$dr = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT peer_id_ascii FROM `{$TABLE_PREFIX}bannedclient` WHERE `id`=" . $id));
@mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM xbt_deny_from_clients WHERE peer_id=" . sqlesc($dr['peer_id_ascii']));
unset($dr);
}
@mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM `{$TABLE_PREFIX}bannedclient` WHERE `id`=" . $id);
success_msg($language["SUCCESS"], $language["CLIENT_REMOVED"] . "<a href='{$url}'>" . $language["RETURN"] . "</a>");
stdfoot();
exit;
} else {
redirect($url);
}
}
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM `{$TABLE_PREFIX}bannedclient` WHERE `id`={$id}");
if (@mysqli_num_rows($res) > 0) {
$client = array();
$i = 0;
while ($row = mysqli_fetch_assoc($res)) {
$client[$i]["client_name"] = $row["client_name"];
$client[$i]["user_agent"] = $row["user_agent"];
$client[$i]["peer_id"] = $row["peer_id"];
$client[$i]["peer_id_ascii"] = $row["peer_id_ascii"];
示例6: stdfoot
stdfoot();
exit;
} elseif ($_POST["new_pwd"] != $_POST["new_pwd1"]) {
err_msg($language["ERROR"], $language["DIF_PASSWORDS"]);
stdfoot();
exit;
} else {
$respwd = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}users WHERE id={$uid} AND password='" . md5($_POST["old_pwd"]) . "' AND username=" . sqlesc($CURUSER["username"]) . "");
if (!$respwd || mysql_num_rows($respwd) == 0) {
err_msg($language["ERROR"], $language["ERR_RETR_DATA"]);
} else {
$arr = mysql_fetch_assoc($respwd);
do_sqlquery("UPDATE {$TABLE_PREFIX}users SET password='" . md5($_POST["new_pwd"]) . "' WHERE id={$uid} AND password='" . md5($_POST["old_pwd"]) . "' AND username=" . sqlesc($CURUSER["username"]) . "") or die(mysql_error());
if ($GLOBALS["FORUMLINK"] == "smf") {
$passhash = smf_passgen($CURUSER["username"], $_POST["new_pwd"]);
do_sqlquery("UPDATE {$db_prefix}members SET passwd='{$passhash['0']}', passwordSalt='{$passhash['1']}' WHERE ID_MEMBER=" . $arr["smf_fid"]) or die(mysql_error());
}
success_msg($language["PWD_CHANGED"], "" . $language["NOW_LOGIN"] . "<br /><a href=\"index.php?page=login\">Go</a>");
stdfoot(true, false);
}
}
break;
case '':
case 'change':
default:
$pwdtpl = array();
$pwdtpl["frm_action"] = "index.php?page=usercp&do=pwd&action=post&uid=" . $uid . "";
$pwdtpl["frm_cancel"] = "index.php?page=usercp&uid=" . $uid . "";
$usercptpl->set("pwd", $pwdtpl);
break;
}
示例7: success_msg
$isbool = $db->delete($table, "id=" . $id[$i]);
}
if ($isbool !== false) {
success_msg('删除成功', '?');
} else {
error_msg('删除失败', 'back');
}
}
}
if ($action == "bj") {
$id = $_GET['id'];
$result = $db->query_by_id($table, $id);
$row = $db->fetch($result);
$smarty->assign('user', $row);
}
if ($action == "edit") {
$id = $_POST['id'];
$state = $_POST['state'];
$mod_content = "state={$state}";
$where = 'id=' . $id;
$isbool = $db->update($table, $mod_content, $where);
if ($isbool !== false) {
success_msg('修改成功', '?');
} else {
error_msg('修改失败', 'back');
}
}
$smarty->assign("action", $action);
$smarty->assign("keyword", @$_GET["keyword"]);
$smarty->display('sysadmin/yuyue.html');
require_once 'footer.php';
示例8: fondos_debitos
<?php
include_once 'include/util.php';
$query = "\n INSERT INTO fondos_debitos (\n fecha,\n fondo,\n monto,\n concepto\n )\n VALUES (\n now(),\n " . $_REQUEST['fondo'] . ",\n " . $_REQUEST['monto'] . ",\n '" . verificar_sql($_REQUEST['concepto']) . "'\n )";
if (!mysql_query($query)) {
sql_error_msg();
return;
}
$Codigo = mysql_insert_id();
$query = "\n UPDATE\n fondos\n SET\n saldo = saldo - " . $_REQUEST['monto'] . "\n WHERE\n codigo = " . $_REQUEST['fondo'];
if (!mysql_query($query)) {
sql_error_msg();
return;
}
/*
* AGREGAR LA OPERACION EN LOS MOVIMIENTOS:
*/
if (!registrar_movimiento(4, $Codigo, $_REQUEST['monto'])) {
sql_error_msg();
return;
}
success_msg("Se ha debitado el monto del fondo!");
示例9: talonarios
<?php
include 'include/util.php';
$query = "INSERT INTO\n talonarios (\n codigo,\n descripcion,\n fecha,\n inicio,\n actual \n ) VALUES (\n " . $_REQUEST['codigo'] . ",\n '" . verificar_sql($_REQUEST['descripcion']) . "',\n now(),\n " . verificar_sql($_REQUEST['inicio']) . ",\n " . verificar_sql($_REQUEST['actual']) . "\n )";
if (!mysql_query($query)) {
sql_error_msg();
return;
}
if (!registrar_movimiento(46, $_REQUEST['codigo'])) {
sql_error_msg();
return;
}
success_msg("Se ha agregado el talonario!");
示例10: elseif
} elseif ($case == 8) {
$msg = $language["ERR_NICK_NOT_ALLOWED"];
} elseif ($case == 9) {
$msg = $language["ERR_USER_ALREADY_EXISTS"];
}
err_msg($language["ERROR"], $msg);
stdfoot();
exit;
}
do_sqlquery("UPDATE {$TABLE_PREFIX}users SET username='{$nick1}' WHERE id=" . $CURUSER["uid"]);
if ($GLOBALS["FORUMLINK"] == "smf") {
do_sqlquery("UPDATE {$db_prefix}members SET memberName='{$nick1}', realName='{$nick1}' WHERE ID_MEMBER=" . $CURUSER["smf_fid"]);
do_sqlquery("UPDATE {$db_prefix}messages SET posterName='{$nick1}' WHERE ID_MEMBER=" . $CURUSER["smf_fid"]);
}
write_log($language["CHANGED_THEIR_NICK"] . $nick1, "modify");
success_msg($language["SUCCESS"], $language["NICK_CHANGE_SUCCESS"] . $nick1);
stdfoot();
exit;
break;
case '':
case 'change':
default:
$rentpl = array();
$rentpl["username"] = $CURUSER["username"];
// -----------------------------
// Captcha hack
// -----------------------------
if ($USE_IMAGECODE) {
if (extension_loaded('gd')) {
$arr = gd_info();
if ($arr['FreeType Support'] == 1) {
示例11: do_sqlquery
exit;
}
// Update their tracker member record with the now verified email address
do_sqlquery("UPDATE {$TABLE_PREFIX}users SET email='" . mysqli_real_escape_string($DBDT, $newmail) . "' WHERE id='" . $id . "'", true);
// If using SMF, update their record on that too.
if (substr($GLOBALS["FORUMLINK"], 0, 3) == "smf") {
$basedir = substr(str_replace("\\", "/", dirname(__FILE__)), 0, strrpos(str_replace("\\", "/", dirname(__FILE__)), '/'));
$language2 = $language;
require_once $basedir . "/smf/Settings.php";
$language = $language2;
do_sqlquery("UPDATE `{$db_prefix}members` SET `email" . ($GLOBALS["FORUMLINK"] == "smf" ? "A" : "_a") . "ddress`='" . mysqli_real_escape_string($DBDT, $newmail) . "' WHERE " . ($GLOBALS["FORUMLINK"] == "smf" ? "`ID_MEMBER`" : "`id_member`") . "=" . $getacc["smf_fid"], true);
} elseif ($GLOBALS["FORUMLINK"] == "ipb") {
IPSMember::save($getacc["ipb_fid"], array("members" => array("email" => "{$newmail}")));
}
// Print a message stating that their email has been successfully changed
success_msg($language["SUCCESS"], $language["REVERIFY_CONGRATS1"] . " " . $oldmail . " " . $language["REVERIFY_CONGRATS2"] . " " . $newmail . " " . $language["REVERIFY_CONGRATS3"] . "<a href=\"" . $BASEURL . "\">" . $language["MNU_INDEX"] . "</a>");
stdfoot(true, false);
// If the member clicking the link is validating...
if ($idlevel == 2) {
// ...we may as well upgrade their rank to member whilst we're at it.
do_sqlquery("UPDATE {$TABLE_PREFIX}users SET id_level=3 WHERE id='" . $id . "'");
if (substr($GLOBALS["FORUMLINK"], 0, 3) == "smf") {
do_sqlquery("UPDATE {$db_prefix}members SET " . ($GLOBALS["FORUMLINK"] == "smf" ? "`ID_GROUP`" : "`id_group`") . "=" . ($getacc["smf_group_mirror"] > 0 ? $getacc["smf_group_mirror"] : "13") . " WHERE " . ($GLOBALS["FORUMLINK"] == "smf" ? "`ID_MEMBER`" : "`id_member`") . "=" . $getacc["smf_fid"]);
} elseif ($GLOBALS["FORUMLINK"] == "ipb") {
$ipblev = $getacc["ipb_group_mirror"] > 0 ? $getacc["ipb_group_mirror"] : "3";
IPSMember::save($getacc["ipb_fid"], array("members" => array("member_group_id" => "{$ipblev}")));
}
}
} else {
err_msg($language["REVERIFY_FAILURE"] . "<a href=\"" . $BASEURL . "\">" . $language["MNU_INDEX"] . "</a>");
stdfoot();
示例12: verificar_sql
<?php
$iva = 0;
$discrimina = 0;
if (isset($_REQUEST['iva'])) {
if ($_REQUEST['iva'] == 1 || strtolower($_REQUEST['iva']) == 'true' || strtolower($_REQUEST['iva']) == 'on' || strtolower($_REQUEST['iva']) == 'checked') {
$iva = 1;
}
}
if (isset($_REQUEST['discrimina'])) {
if ($_REQUEST['discrimina'] == 1 || strtolower($_REQUEST['discrimina']) == 'true' || strtolower($_REQUEST['discrimina']) == 'on' || strtolower($_REQUEST['discrimina']) == 'checked') {
$discrimina = 1;
}
}
include 'include/util.php';
$query = "\n UPDATE\n facturas_tipo\n SET\n descripcion = '" . verificar_sql($_REQUEST['descripcion']) . "',\n iva = " . $iva . ",\n discrimina = " . $discrimina . "\n WHERE\n codigo = " . $_REQUEST['codigo'];
if (!mysql_query($query)) {
sql_error_msg();
return;
}
if (!registrar_movimiento(29, $_REQUEST['codigo'])) {
sql_error_msg();
return;
}
success_msg("Se ha editado el tipo de factura!");
示例13: alert_msg
<?php
include 'include/util.php';
$Articulos = $_REQUEST['articulos'];
if (!isset($Articulos)) {
alert_msg("No se han seleccionado artículos!");
return;
}
foreach ($Articulos as $Articulo) {
$query = "\n INSERT INTO\n listas_precio_detalle (lista, articulo, precio) \n VALUES (\n " . $_REQUEST['lista'] . ",\n " . $Articulo . ",\n (SELECT costo FROM articulos WHERE codigo = " . $Articulo . ")\n )";
if (!mysql_query($query)) {
sql_error_msg();
return;
}
}
if (!registrar_movimiento(53, 0)) {
sql_error_msg();
return;
}
success_msg("Se han agregado los artículos a la lista!");
示例14: switch
}
$admintpl->set("add_new", false, true);
switch ($action) {
case 'delete':
$id = max(0, $_GET["id"]);
// controle if this level can be cancelled
$rcanc = do_sqlquery("SELECT can_be_deleted FROM {$TABLE_PREFIX}users_level WHERE id={$id}");
if (!$rcanc || mysql_num_rows($rcanc) == 0) {
err_msg($language["ERROR"], $language["ERR_CANT_FIND_GROUP"]);
stdfoot(false, false, true);
die;
}
$rcancanc = mysql_fetch_array($rcanc);
if ($rcancanc["can_be_deleted"] == "yes") {
do_sqlquery("DELETE FROM {$TABLE_PREFIX}users_level WHERE id={$id}", true);
success_msg($language["SUCCESS"], $language["GROUP_DELETED"] . "<br />\n<a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=groups\">" . $language["ACP_USER_GROUP"] . "</a>");
stdfoot(false, false, true);
die;
} else {
err_msg($language["ERROR"], $language["CANT_DELETE_GROUP"]);
stdfoot(false, false, true);
die;
}
break;
case 'edit':
$block_title = $language["GROUP_EDIT_GROUP"];
$gid = max(0, $_GET["id"]);
$admintpl->set("list", false, true);
$admintpl->set("frm_action", "index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=groups&action=save&id={$gid}");
$admintpl->set("language", $language);
$rgroup = get_result("SELECT * FROM {$TABLE_PREFIX}users_level WHERE id={$gid}", true);
示例15: empty
<?php
require_once 'inc.php';
$table = 'cn_login_log';
$action = empty($_GET["action"]) ? '' : $_GET["action"];
if ($action == "delete") {
$id = $_POST['id'];
$isbool = true;
if (!empty($id)) {
for ($i = 0; $i < count($id); $i++) {
$isbool = $db->delete($table, "id=" . $id[$i]);
}
if ($isbool !== false) {
success_msg('删除成功', prev_url());
} else {
error_msg('删除失败', 'back');
}
}
}
if ($action == '') {
$where = @$_GET['keyword'] != '' ? " AND userId LIKE '%" . @$_GET['keyword'] . "%'" : '';
$order = ' ORDER BY id DESC';
$page_size = 20;
$current_page = !@$_GET['p'] ? 1 : @$_GET['p'];
$nums = $db->query_count($table, $where);
$logList = array();
$result = $db->query_page_list($table, $page_size, $current_page, $order, $where);
while ($row = $db->fetch($result)) {
$logList[] = $row;
}
$pager = new Pager($page_size, $nums, $current_page, 8);