本文整理汇总了PHP中err_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP err_msg函数的具体用法?PHP err_msg怎么用?PHP err_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了err_msg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: proses_claim
public function proses_claim()
{
$param = $this->input->post();
$config = $this->config->item('astro');
$operator = $this->session->userdata('astrosession');
$this->load->library('form_validation');
$this->form_validation->set_rules('tgl_awal', 'Tgl Awal', 'trim|required|xss_clean');
$this->form_validation->set_rules('tgl_akhir', 'Tgl Akhir', 'trim|required|xss_clean');
if ($this->form_validation->run() == FALSE) {
echo "0|" . warn_msg(validation_errors());
} else {
if ($param['bank'] != 'all' && $param['bank'] != '') {
$where2 = 'AND note =' . $this->mr->protect($param['bank']);
} else {
$where2 = '';
}
$where = "date BETWEEN " . $this->mr->protect($param['tgl_awal']) . " AND " . $this->mr->protect($param['tgl_akhir']);
$replace = $this->mr->replace('penjualan', array('debet-claimed' => 'yes'), $where);
if ($replace) {
echo '1|' . succ_msg('Berhasil merubah status pembayaran debet');
} else {
echo '1|' . err_msg('Gagal, melakukan perubahan');
}
}
}
示例2: tambah_stok
public function tambah_stok()
{
$param = $this->input->post();
$user = $this->session->userdata('astrosession');
$this->load->library('form_validation');
$this->form_validation->set_rules('product_code', 'Produk', 'trim|required|xss_clean');
$this->form_validation->set_rules('in', 'Qty', 'trim|required|xss_clean');
if ($this->form_validation->run() == FALSE) {
echo "0|" . warn_msg(validation_errors());
} else {
$produk = $this->mp->get_detail_product($param['product_code']);
$param['date'] = date('Y-m-d');
$param['status'] = 'input';
$param['reference'] = '';
$param['out'] = 0;
$param['description'] = 'Penambahan Stok' . $produk['name'];
$param['userlog'] = date('Y-m-d H:i:s');
$param['operator'] = $user[0]->uname;
$param['rak_code'] = $produk['gudang_code'];
$save = $this->mp->write('atombizz_warehouses_stok', $param);
if ($save == TRUE) {
echo "1|" . succ_msg("Stok Produk berhasil ditambahkan.");
} else {
echo "0|" . err_msg("Gagal menambahkan stok produk, periksa kembali masukan Anda");
}
}
}
示例3: delete
public function delete($value = '')
{
$param = $this->input->post();
$delete = $this->mb->delete('atombizz_inventaris', array('id' => $param['id']));
if ($delete) {
echo '1|' . succ_msg('Berhasil menghapus data.');
} else {
echo '0|' . err_msg('Gagal menghapus data.');
}
}
示例4: kirim_barang
public function kirim_barang()
{
$param = $this->input->post();
$replace = $this->mp->replace('atombizz_selling', array('status_pengiriman' => '1'), array('id' => $param['id']));
if ($replace) {
echo '1|' . succ_msg('Berhasil merubah status pengiriman barang.');
} else {
echo '0|' . err_msg('Gagal merubah data.');
}
}
示例5: delete
public function delete()
{
$id = $this->input->post('id');
$where = array('id' => $id);
$delete = $this->mb->delete('atombizz_brand_converter', $where);
if ($delete) {
echo "1|" . succ_msg("Master Konversi berhasil dihapus.");
} else {
echo "0|" . err_msg("Gagal, coba periksa lagi inputan anda.");
}
}
示例6: checkin_guest
public function checkin_guest()
{
$param = $this->input->post();
$data = array('room_number' => $param['cek_room'], 'status' => 'checkin');
$where = array('id' => $param['cek_id']);
$update = $this->mr->replace('atombizz_tmp_use_facilities', $data, $where);
if ($update) {
echo succ_msg('Pelanggan berhasil cek in.');
} else {
echo err_msg('Pelanggan tidak dapat cek in.');
}
}
示例7: save
public function save()
{
$user = $this->session->userdata('astrosession');
$config = $this->config->item('astro');
$param = $this->input->post();
$masuk = $keluar = 0;
if ($param['status'] == 'in') {
$masuk = $param['qty'];
} else {
$keluar = $param['qty'];
}
$stok = array('date' => date('Y-m-d'), 'status' => $param['status'], 'in' => $masuk, 'out' => $keluar, 'description' => $param['keterangan'], 'userlog' => date('Y-m-d H:i:s'), 'operator' => $user[0]->uname, 'product_code' => $param['product_code'], 'dept' => $config['bas_code_dept']);
$save = $this->mi->write('atombizz_inventaris_stok', $stok);
if ($save) {
echo '1|' . succ_msg('Berhasil menyimpan pencatatan stok barang.');
} else {
echo '0|' . err_msg('Gagal menyimpan pencatatan stok barang.');
}
}
示例8: mysqli_fetch_array
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"];
$client[$i]["reason"] = stripslashes($row["reason"]);
$i++;
}
$admintpl->set('client', $client);
} else {
err_msg($language["ERROR"], $language['BAD_ID']);
stdfoot();
exit;
}
示例9: aggiungiutente
function aggiungiutente()
{
global $SITENAME, $SITEEMAIL, $BASEURL, $VALIDATION, $USERLANG, $USE_IMAGECODE, $TABLE_PREFIX, $XBTT_USE, $language, $THIS_BASEPATH, $FORUMLINK, $db_prefix;
$utente = mysql_escape_string($_POST["user"]);
$pwd = mysql_escape_string($_POST["pwd"]);
$pwd1 = mysql_escape_string($_POST["pwd1"]);
$email = mysql_escape_string($_POST["email"]);
$idlangue = intval($_POST["language"]);
$idstyle = intval($_POST["style"]);
$idflag = intval($_POST["flag"]);
$timezone = intval($_POST["timezone"]);
if (strtoupper($utente) == strtoupper("Guest")) {
err_msg($language["ERROR"], $language["ERR_GUEST_EXISTS"]);
stdfoot();
exit;
}
if ($pwd != $pwd1) {
err_msg($language["ERROR"], $language["DIF_PASSWORDS"]);
stdfoot();
exit;
}
if ($VALIDATION == "none") {
$idlevel = 3;
} else {
$idlevel = 2;
}
# Create Random number
$floor = 100000;
$ceiling = 999999;
srand((double) microtime() * 1000000);
$random = rand($floor, $ceiling);
if ($utente == "" || $pwd == "" || $email == "") {
return -1;
exit;
}
$res = do_sqlquery("SELECT email FROM {$TABLE_PREFIX}users WHERE email='{$email}'");
if (mysql_num_rows($res) > 0) {
return -2;
exit;
}
// valid email check - by vibes
$regex = "^[_+a-z0-9-]+(\\.[_+a-z0-9-]+)*" . "@[a-z0-9-]+(\\.[a-z0-9-]{1,})*" . "\\.([a-z]{2,}){1}\$";
if (!eregi($regex, $email)) {
return -3;
exit;
}
// valid email check end
// duplicate username
$res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE username='{$utente}'");
if (mysql_num_rows($res) > 0) {
return -4;
exit;
}
// duplicate username
if (strpos(mysql_escape_string($utente), " ") == true) {
return -7;
exit;
}
if ($USE_IMAGECODE) {
if (extension_loaded('gd')) {
$arr = gd_info();
if ($arr['FreeType Support'] == 1) {
$public = $_POST['public_key'];
$private = $_POST['private_key'];
$p = new ocr_captcha();
if ($p->check_captcha($public, $private) != true) {
err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]);
stdfoot();
exit;
}
} else {
include "{$THIS_BASEPATH}/include/security_code.php";
$scode_index = intval($_POST["security_index"]);
if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) {
err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]);
stdfoot();
exit;
}
}
} else {
include "{$THIS_BASEPATH}/include/security_code.php";
$scode_index = intval($_POST["security_index"]);
if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) {
err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]);
stdfoot();
exit;
}
}
} else {
include "{$THIS_BASEPATH}/include/security_code.php";
$scode_index = intval($_POST["security_index"]);
if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) {
err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]);
stdfoot();
exit;
}
}
$bannedchar = array("\\", "/", ":", "*", "?", "\"", "@", "\$", "'", "`", ",", ";", ".", "<", ">", "!", "£", "%", "^", "&", "(", ")", "+", "=", "#", "~");
if (straipos(mysql_escape_string($utente), $bannedchar) == true) {
return -8;
//.........这里部分代码省略.........
示例10: die
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
//by CobraCRK 21.07.2006 - www.extremeshare.org - cobracrk@yahoo.com
//converted to xbtit by cooly
if (!defined("IN_BTIT")) {
die("non direct access!");
}
global $CURUSER;
require "include/sanitize.php";
$subsedittpl = new bTemplate();
require load_language("lang_subs.php");
if ($CURUSER["can_upload"] == "no") {
err_msg(ERROR, NOT_AUTH_VIEW_NEWS);
stdfoot();
exit;
}
$action = $_GET["action"];
if ($action == "edit") {
$id = $_GET["id"];
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}subtitles WHERE id=" . $_GET['id']) or sqlerr();
if (mysqli_num_rows($res) != 1) {
stderr("Error", "No message with ID {$id}.");
}
$arr = mysqli_fetch_assoc($res);
if ($CURUSER["uid"] != $arr["uploader"] or $CURUSER["edit_torrents"] != "yes") {
stderr("Error", "you didnt post this!");
}
$save = (int) $_GET["save"];
示例11: proses_retur_out
public function proses_retur_out()
{
$basmalah = $this->config->item('astro');
$userlog = date('Y-m-d H:i:s');
$param = $this->input->post();
$reference = $this->input->post('reference');
$where = array('reference' => $reference);
$keterangan = 'Retur Keluar dengan referensi no ' . $reference;
$data = $this->mp->find('view_tmp_retur_out', $where);
$nominal_retur_out = 0;
foreach ($data->result_array() as $das) {
$arr_detail[] = array('reference' => $reference, 'product_id' => $das['product_id'], 'product_code' => $das['product_code'], 'product_name' => $das['product_name'], 'quantity' => $das['quantity'], 'hpp' => $das['hpp'], 'description' => $das['description'], 'brand_code' => $das['brand_code'], 'unit' => $das['unit']);
$nominal_retur_out += $das['sub_total'];
$qty = $das['quantity'];
$unit = $das['unit'];
//brand konversi stok
if ($das['brand_code'] != '') {
$query = $this->mp->find('atombizz_brand_converter', array('product_code' => $das['product_code'], 'code' => $das['brand_code']));
$konv_brand = $query->row();
$qty = $das['quantity'] * $konv_brand->qty_convertion;
$unit = $konv_brand->satuan_convertion;
}
//konversi satuan terkecil
$konv_unit = unit_converter($qty, $unit);
$data_konv = json_decode($konv_unit);
$qty = $data_konv->qty;
$unit = $data_konv->satuan;
$arr_stok[] = array('date' => $param['date'], 'status' => 'retur out', 'reference' => $reference, 'in' => 0, 'out' => $qty, 'description' => $keterangan, 'userlog' => $userlog, 'operator' => $param['operator'], 'rak_code' => $das['gudang_code'], 'product_code' => $das['product_code'], 'dept' => $basmalah['bas_code_dept']);
}
// print_r($arr_stok);exit;
$arr_retur_out = array('reference' => $reference, 'supplier_code' => $param['supplier_code'], 'supplier_name' => $param['supplier_name'], 'date' => $param['date'], 'operator' => $param['operator'], 'total' => $param['total_akhir'], 'urut' => $param['urut'], 'dept' => $basmalah['bas_code_dept'], 'userlog' => $userlog);
$save_items = $this->mp->write_batch('atombizz_retur_out_detail', $arr_detail);
if ($save_items == TRUE) {
$save_stok = $this->mp->write_batch('atombizz_warehouses_stok', $arr_stok);
if ($save_stok == TRUE) {
$save_beli = $this->mp->write('atombizz_retur_out', $arr_retur_out);
// echo $this->db->last_query();exit;
if ($save_beli == TRUE) {
$where = array('reference' => $reference);
$delete = $this->mp->delete('atombizz_retur_out_tmp', $where);
if ($delete > 0) {
$kode = 'FRO';
$data = array('kode' => $kode, 'no_referensi' => $reference, 'tanggal' => $param['date'], 'keterangan' => $keterangan, 'dept' => $basmalah['bas_code_dept'], 'person' => $param['supplier_code'], 'valid' => 'yes');
//retur
$data['debit'] = 0;
$data['kredit'] = $param['total_akhir'];
$data['no_akun'] = '330000';
$kas_acc = $this->mp->write('atombizz_accounting_buku_besar', $data);
//hutang
$data['kredit'] = 0;
$data['debit'] = $param['total_akhir'];
$data['no_akun'] = '510000';
$data['faktur'] = $reference;
$data['kode'] = 'HTG';
$save_acc = $this->mp->write('atombizz_accounting_buku_besar', $data);
if ($save_acc == TRUE) {
echo "1|" . succ_msg("Berhasil, menambahkan data retur keluar.");
} else {
echo "0|" . err_msg("Gagal, menambahkan data accounting persediaan.");
}
}
} else {
echo "0|" . err_msg("Gagal, menambahkan data retur keluar.");
}
} else {
echo "0|" . err_msg("Gagal, mengurangi data stok bahan.");
}
} else {
echo "0|" . err_msg("Gagal, menambahkan data retur keluar detail.");
}
}
示例12: die
<?php
if (!defined("IN_BTIT")) {
die("non direct access!");
}
require load_language("lang_staff.php");
$stafftpl = new bTemplate();
$stafftpl->set("language", $language);
if ($CURUSER["view_users"] == "no") {
err_msg($language["ERROR"], $language["NOT_AUTHORIZED"] . " " . strtolower($language["STAFF"]) . "!");
stdfoot();
exit;
} else {
$query = "SELECT u.id, u.username, u.avatar, UNIX_TIMESTAMP(u.joined) joined, ";
$query .= "UNIX_TIMESTAMP(u.lastconnect) lastconnect, ul.level, ul.prefixcolor, ";
$query .= "ul.suffixcolor, c.name country, c.flagpic, o.lastaction ";
$query .= "FROM {$TABLE_PREFIX}users u ";
$query .= "LEFT JOIN {$TABLE_PREFIX}users_level ul ON u.id_level = ul.id ";
$query .= "LEFT JOIN {$TABLE_PREFIX}countries c ON u.flag = c.id ";
$query .= "LEFT JOIN {$TABLE_PREFIX}online o ON u.id = o.user_id ";
$query .= "WHERE u.id_level >=6 ";
$query .= "AND u.id_level <=8 ";
$query .= "ORDER BY u.id_level DESC, u.id ASC";
$res = do_sqlquery($query);
$i = 0;
while ($row = mysql_fetch_assoc($res)) {
is_null($row["avatar"]) || $row["avatar"] == "" ? $avatar = "<img src='{$STYLEURL}/images/default_avatar.gif' height=80 width=80>" : ($avatar = "<img src='" . $row["avatar"] . "' height=80 width=80>");
is_null($row["lastaction"]) ? $lastseen = $row["lastconnect"] : ($lastseen = $row["lastaction"]);
time() - $lastseen > 900 ? $status = "<img src='images/offline.gif' border='0' alt='" . $language["OFFLINE"] . "'>" : ($status = "<img src='images/online.gif' border='0' alt='" . $language["ONLINE"] . "'>");
if (is_null($row["flagpic"])) {
$row["flagpic"] = "unknown.gif";
示例13: die
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
if ($CURUSER["view_news"] == "no") {
err_msg($language["ERROR"], $language["NOT_AUTHORIZED"] . "!");
stdfoot();
exit;
}
// global $CURUSER, $limitqry, $adm_menu, $CURRENTPATH, $TABLE_PREFIX;
// $output="";
if ($limit > 0) {
$limitqry = "LIMIT {$limit}";
}
$res = get_result("SELECT n.id, n.title, n.news,UNIX_TIMESTAMP(n.date) as news_date, u.username FROM {$TABLE_PREFIX}news n INNER JOIN {$TABLE_PREFIX}users u on u.id=n.user_id ORDER BY date DESC {$limitqry}", true, $btit_settings['cache_duration']);
// load language file
require load_language("lang_viewnews.php");
$viewnewstpl = new bTemplate();
$viewnewstpl->set("language", $language);
$viewnewstpl->set("can_edit_news", $CURUSER["edit_news"] == "yes", TRUE);
$viewnewstpl->set("can_edit_news_1", $CURUSER["edit_news"] == "yes", TRUE);
示例14: del_mix_bahan
public function del_mix_bahan()
{
$param = $this->input->post();
$delete = $this->mm->delete('atombizz_mix_product', array('id' => $param['id']));
if ($delete) {
echo '1|' . succ_msg('Berhasil menghapus data mix komposisi.');
} else {
echo '0|' . err_msg('Gagal menghapus data mix komposisi.');
}
}
示例15: delete
public function delete()
{
$id = $this->input->post('id');
$where = array('id' => $id);
$delete = $this->ksr->delete('detil-penjualan', $where);
if ($delete) {
echo "1|" . succ_msg("Pesanan berhasil dihapus.");
} else {
echo "0|" . err_msg("Gagal, coba periksa lagi inputan anda.");
}
}