function _save_data2_($var_pesanno) { if (_is_not_null_($var_pesanno)) { if ($this->_is_primary_exist_($var_pesanno)) { _set_query_("UPDATE " . def_table_inbox . " SET statusyn='" . def_yes . "' WHERE pesanno='" . _set_input_string_($var_pesanno) . "'"); } } }
function _delete_data_($var_handphoneno) { if (!_is_not_null_($var_handphoneno)) { return false; } if ($this->_is_primary_exist_($var_handphoneno)) { return _set_query_("DELETE FROM " . def_table_handphone . " WHERE handphoneno=" . _set_input_string_($var_handphoneno)); } else { return false; } }
function _save_data_($var_pesan, $var_nohp, $var_tanggal = "NOW()", $var_pesanno = "") { if (_is_not_null_($var_pesanno)) { if (_is_primary_exist_($var_pesanno)) { _set_query_("UPDATE " . def_table_outbox . " SET pesan='" . _set_input_string_($var_pesan) . "', nohp='" . _set_input_string_($var_nohp) . "', tanggal=" . $var_tanggal . " WHERE pesanno='" . _set_input_string_($var_pesanno) . "'"); } else { _set_query_("INSERT INTO " . def_table_outbox . " VALUES ('', '" . _set_input_string_($var_pesan) . "', '" . _set_input_string_($var_nohp) . "', " . $var_tanggal . ")"); } } else { _set_query_("INSERT INTO " . def_table_outbox . " VALUES ('', '" . _set_input_string_($var_pesan) . "', '" . _set_input_string_($var_nohp) . "', " . $var_tanggal . ")"); } }
function _is_status_($var_userid) { if (!_is_not_null_($var_userid)) { return false; } $var_query_link = _set_query_("SELECT statusyn FROM " . def_table_pemakai . " WHERE userid='" . _set_input_string_($var_userid) . "'"); if (_get_num_rows_($var_query_link) > 0) { $var_array_user = _set_fetch_array_($var_query_link); if ($var_array_user["statusyn"] == def_yes) { return true; } else { return false; } } else { return false; } }
function _delete_data_($var_jenisid) { if (!_is_not_null_($var_jenisid)) { return false; } if ($this->_is_primary_exist_($var_jenisid)) { _set_query_("DELETE FROM " . def_table_jenis . " WHERE jenisid='" . _set_input_string_($var_jenisid) . "'"); $var_query_link = _set_query_("SELECT menuid FROM " . def_table_menu . " WHERE jenisid='" . _set_input_string_($var_jenisid) . "'"); while ($var_array_menu = _set_fetch_array_($var_query_link)) { _set_query_("DELETE FROM " . def_table_pesan_detil . " WHERE menuid='" . _set_input_string_($var_array_menu['menuid']) . "'"); _set_query_("DELETE FROM " . def_table_keranjang . " WHERE menuid='" . _set_input_string_($var_array_menu['menuid']) . "'"); _set_query_("DELETE FROM " . def_table_daftarharga . " WHERE menuid='" . _set_input_string_($var_array_menu['menuid']) . "'"); } _set_query_("DELETE FROM " . def_table_menu . " WHERE jenisid='" . _set_input_string_($var_jenisid) . "'"); } else { return false; } }
function _check_it_($var_userid, $var_menuid, $var_qty, &$var_subtotal, &$var_total) { require_once def_directory_classes . "class_keranjang.php"; $var_class_keranjang = new _class_keranjang_(); $var_subtotal = 0; $var_total = 0; $var_query_link = _set_query_("SELECT menuid, qty FROM " . def_table_keranjang . " WHERE userid='" . _set_input_string_($var_userid) . "' AND menuid='" . _set_input_string_($var_menuid) . "'"); while ($var_menu = _set_fetch_array_($var_query_link)) { $var_subtotal += (int) $var_qty * _set_double_($var_class_keranjang->_set_harga_($var_menu['menuid']), 0); } $var_query_link = _set_query_("SELECT menuid, qty FROM " . def_table_keranjang . " WHERE userid='" . _set_input_string_($var_userid) . "'"); while ($var_menu = _set_fetch_array_($var_query_link)) { if ($var_menu['menuid'] == $var_menuid) { $var_total += (int) $var_qty * _set_double_($var_class_keranjang->_set_harga_($var_menu['menuid']), 0); } else { $var_total += (int) $var_menu['qty'] * _set_double_($var_class_keranjang->_set_harga_($var_menu['menuid']), 0); } } }
echo _set_label_("", $var_array_pesan['menuid'] . ' - ' . _set_field_value(def_table_menu, "nama", "menuid='" . _set_input_string_($var_array_pesan['menuid']) . "'")); ?> </td> <td> <?php echo _set_label_("", _set_field_value(def_table_restoran, "nama", "restoranid='" . _set_input_string_(_set_field_value(def_table_menu, "restoranid", "menuid='" . _set_input_string_($var_array_pesan['menuid']) . "'")) . "'")); ?> </td> <td> <?php echo _set_label_("", $var_array_pesan['qty']); ?> </td> <td align="center"> <?php echo _set_image_link_("../" . def_directory_images_buttons . "reply.gif", def_application_order, "", "20px", "20px", "Kirim Lagi", "", "restoranid=" . _set_field_value(def_table_menu, "restoranid", "menuid='" . _set_input_string_($var_array_pesan['menuid']) . "'") . "&menuid=" . $var_array_pesan['menuid'] . "&qty=" . $var_array_pesan['qty'] . "¬ransaksi=" . $var_class_pesan->var_notransaksi . "&process=kirim&action=true"); ?> </td> </tr> <?php } ?> </table> </td> </tr> <tr> <td colspan="3" align="center"> <?php echo _set_submit_("", "Simpan", "submit", 'class="mybutton"'); ?>
function _delete_data_($var_userid) { if (!_is_not_null_($var_userid)) { return false; } if ($this->_is_primary_exist_($var_userid)) { _set_query_("DELETE FROM " . def_table_pemakai . " WHERE userid='" . _set_input_string_($var_userid) . "'"); _set_query_("DELETE FROM " . def_table_voucher . " WHERE userid='" . _set_input_string_($var_userid) . "'"); $var_query_link = _set_query_("SELECT notransaksi FROM " . def_table_pesan_header . " WHERE userid='" . _set_input_string_($var_userid) . "'"); while ($var_array_pesan_header = _set_fetch_array_($var_query_link)) { _set_query_("DELETE FROM " . def_table_pesan_detil . " WHERE notransaksi='" . _set_input_string_($var_array_pesan_header['notransaksi']) . "'"); } _set_query_("DELETE FROM " . def_table_pesan_header . " WHERE userid='" . _set_input_string_($var_userid) . "'"); _set_query_("DELETE FROM " . def_table_output . " WHERE userid='" . _set_input_string_($var_userid) . "'"); _set_query_("DELETE FROM " . def_table_login . " WHERE userid='" . _set_input_string_($var_userid) . "'"); _set_query_("DELETE FROM " . def_table_keranjang . " WHERE userid='" . _set_input_string_($var_userid) . "'"); } else { return false; } }
<table border="0" width="100%" cellpadding="10" cellspacing="0" align="center"> <tr> <td align="center" class="mytitle"> <?php if (isset($HTTP_GET_VARS["restoranid"])) { echo _set_label_("", "Daftar Menu (" . _set_field_value(def_table_restoran, "nama", "restoranid='" . _set_input_string_(_set_variable_http_("restoranid")) . "'") . ")", 'class="mylabel large"'); } else { echo _set_label_("", "Daftar Menu", 'class="mylabel large"'); } ?> </td> </tr> <tr> <td align="left"> <?php if (isset($HTTP_GET_VARS["menuid"]) && isset($HTTP_GET_VARS["action"]) && _set_variable_http_("action") == "true") { ?> <?php require_once def_directory_classes_master . "class_menu.php"; $var_class_menu = new _class_menu_(); $var_menuid = _set_variable_http_("menuid"); $var_class_menu->_set_data_($var_menuid); ?> <table border="0" width="100%" cellpadding="5" cellspacing="5" class="myform"> <tr> <td align="center"> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td align="center" colspan="3">
</td> </tr> <tr> <td align="left"> <?php echo _set_label_("", "Pemakai"); ?> </td> <td> <?php echo _set_label_("", " : "); ?> </td> <td align="left"> <?php echo _set_label_("", $var_class_voucher->var_userid . '-' . _set_field_value(def_table_pemakai, "username", "userid='" . _set_input_string_($var_class_voucher->var_userid) . "'")); ?> </td> </tr> <tr> <td align="left"> <?php echo _set_label_("", "Jumlah"); ?> </td> <td> <?php echo _set_label_("", " : "); ?> </td> <td align="left">
function _check_sms_format_($var_array_value, &$var_alamat) { if (count($var_array_value) == 2) { $var_query_link = _set_query_("SELECT menuid FROM " . def_table_menu . " WHERE kodemenu='" . _set_input_string_($var_array_value[0]) . "'"); if (_get_num_rows_($var_query_link)) { if (is_numeric($var_array_value[1])) { return true; } else { return false; } } else { return false; } } elseif (count($var_array_value) == 3) { $var_query_link = _set_query_("SELECT menuid FROM " . def_table_menu . " WHERE kodemenu='" . _set_input_string_($var_array_value[0]) . "'"); if (_get_num_rows_($var_query_link)) { if (is_numeric($var_array_value[1])) { for ($var_counter = 0; $var_counter < count($this->var_array_alamat); $var_counter++) { if (trim(strtoupper($var_array_value[2])) == $this->var_array_alamat[$var_counter]) { $var_alamat = $this->var_array_alamat2[$var_counter]; return true; } } } else { return false; } } else { return false; } } else { return false; } }
<?php if (isset($var_class_menu) && is_object($var_class_menu)) { if (_is_not_null_($var_class_menu->var_array_menu)) { while (list($var_key, $var_value) = each($var_class_menu->var_array_menu)) { ?> <tr> <td class="mytable_cnt"><?php echo _set_label_("", $var_key); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['nama']); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", _set_field_value(def_table_restoran, "nama", "restoranid='" . _set_input_string_($var_value['restoranid']) . "'")); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['kodemenu']); ?> </td> <td align="center"><?php echo _set_image_link_("../" . def_directory_images_buttons . "info.png", def_application_menu, "", "20px", "20px", "Ubah", "", "process=update&processid=" . $var_key); ?> </td> <td align="center"><?php echo _set_image_link_("../" . def_directory_images_buttons . "delete.png", def_application_menu, "", "20px", "20px", "Hapus", "", "process=delete&processid=" . $var_key); ?> </td> </tr>
</tr> <?php $var_class_keranjang->_restore_contents_(); reset($var_class_keranjang->var_contents); require_once def_directory_classes_master . "class_menu.php"; $var_class_menu = new _class_menu_(); while (list($var_key, $var_value) = each($var_class_keranjang->var_contents)) { $var_class_menu->_set_data_($var_key); ?> <tr> <td class="mytable_cnt"> <?php echo _set_input_("txt_menuid[]", $var_key, "hidden"); echo _set_label_("", _set_field_value(def_table_menu, "nama", "menuid='" . _set_input_string_($var_key) . "'")); ?> </td> <td align="center" class="mytable_cnt"><?php echo _set_input_("txt_qty" . $var_key, $var_value['qty'], "text", 'maxlength="2" style="width: 30px" onkeyup="javascript:_get_total_(\'' . $session_userid . '\', \'' . $var_key . '\', \'txt_qty' . $var_key . '\', \'lbl_subtotal' . $var_key . '\', \'lbl_total\', \'tbl_conf\');"'); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['tanggal']); ?> </td> <td class="mytable_cnt"> <?php $var_class_keranjang->_calculate_($var_key); echo _set_label_("lbl_subtotal" . $var_key, "Rp. " . $var_class_keranjang->var_total); ?>
echo _set_label_("", "Menu"); ?> </td> <td><?php echo _set_label_("", "Qty"); ?> </td> </tr> <?php $var_query_link = _set_query_("SELECT * FROM " . def_table_pesan_detil . " WHERE notransaksi='" . _set_input_string_($var_class_pesan->var_notransaksi) . "'"); while ($var_array_pesan = _set_fetch_array_($var_query_link)) { ?> <tr> <td> <?php echo _set_label_("", $var_array_pesan['menuid'] . ' - ' . _set_field_value(def_table_menu, "nama", "menuid='" . _set_input_string_($var_array_pesan['menuid']) . "'")); ?> </td> <td> <?php echo _set_label_("", $var_array_pesan['qty']); ?> </td> </tr> <?php } ?> </table> </td> </tr>
function _gammu_outbox_(&$var_respon) { $this->_gammu_get_(&$var_respon); $this->var_inbox = array(); if ($this->var_messages) { for ($var_counter = 0; $var_counter < count($this->var_messages['Outbox']); $var_counter++) { $this->var_outbox[$var_counter]['number'] = $this->var_messages['Outbox'][$var_counter]['number']; $this->var_outbox[$var_counter]['senttime'] = $this->var_messages['Outbox'][$var_counter]['senttime']; $this->var_outbox[$var_counter]['body'] = $this->var_messages['Outbox'][$var_counter]['body']; _set_query_("INSERT INTO " . def_table_outbox . " VALUES ('', '" . _set_input_string_($this->var_outbox[$var_counter]['body']) . "', '" . _set_input_string_($this->var_outbox[$var_counter]['number']) . "', '" . _set_input_string_($this->var_outbox[$var_counter]['senttime']) . "')"); } $this->_gammu_delete_all_($var_temp, $this->var_outboxphone); $this->_gammu_delete_all_($var_temp, $this->var_outboxsim); } }
</td> <td width="15px"> </td> <td width="15px"> </td> </tr> <?php if (isset($var_class_voucher) && is_object($var_class_voucher)) { if (_is_not_null_($var_class_voucher->var_array_voucher)) { while (list($var_key, $var_value) = each($var_class_voucher->var_array_voucher)) { ?> <tr> <td class="mytable_cnt"><?php echo _set_label_("", $var_key); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['userid'] . '-' . _set_field_value(def_table_pemakai, "username", "userid='" . _set_input_string_($var_value['userid']) . "'")); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['tanggal']); ?> </td> <td class="mytable_cnt"><?php echo _set_label_("", $var_value['jumlah']); ?> </td> <td align="center"><?php echo _set_image_link_("../" . def_directory_images_buttons . "info.png", def_application_voucher, "", "20px", "20px", "Ubah", "", "process=update&processid=" . $var_key); ?> </td> <td align="center"><?php
" method="post"> <table border="0" cellpadding="3" cellspacing="0" align="center" class="myform"> <tr> <td align="left"> <?php echo _set_label_("", "Menu"); ?> </td> <td> <?php echo _set_label_("", " : "); ?> </td> <td align="left"> <?php echo _set_label_("", $var_class_daftarharga->var_menuid . '-' . _set_field_value(def_table_menu, "nama", "menuid='" . _set_input_string_($var_class_daftarharga->var_menuid) . "'")); ?> <?php echo _set_input_("txt_kode", $var_class_daftarharga->var_kode, "hidden"); ?> </td> </tr> <tr> <td align="left"> <?php echo _set_label_("", "Harga"); ?> </td> <td> <?php echo _set_label_("", " : ");
function _set_increment_id_() { $var_query_link = _set_query_("SELECT restoranid FROM " . def_table_restoran); if (_get_num_rows_($var_query_link) > 0) { $var_hole = 0; for ($var_counter = 1; $var_counter <= _get_num_rows_($var_query_link); $var_counter++) { $var_check_link = _set_query_("SELECT restoranid FROM " . def_table_restoran . " WHERE restoranid='" . _set_input_string_(_set_padding_($var_counter, 3, "0", false)) . "'"); if (_get_num_rows_($var_check_link) <= 0) { $var_hole = $var_counter; break; } } if ($var_hole == 0) { $var_hole = _get_num_rows_($var_query_link) + 1; } return _set_padding_($var_hole, 3, "0", false); } else { return _set_padding_("1", 3, "0", false); } }
function _session_destroy_($var_sessionid) { return _set_query_("DELETE FROM " . def_table_session . " WHERE sessionid='" . _set_input_string_($var_sessionid) . "'"); }
function _set_increment_output_id_($var_userid) { $var_query_link = _set_query_("SELECT outputid FROM " . def_table_output); date_default_timezone_set('Asia/Krasnoyarsk'); if (_get_num_rows_($var_query_link) > 0) { $var_hole = 0; for ($var_counter = 1; $var_counter <= _get_num_rows_($var_query_link); $var_counter++) { $var_check_link = _set_query_("SELECT outputid FROM " . def_table_output . " WHERE outputid='" . _set_input_string_(_set_padding_($var_userid, 15)) . _set_input_string_(date("dmY") . _set_padding_($var_counter, 2, "0", false)) . "'"); if (_get_num_rows_($var_check_link) <= 0) { $var_hole = $var_counter; break; } } if ($var_hole == 0) { $var_hole = _get_num_rows_($var_query_link) + 1; } return _set_input_string_(_set_padding_($var_userid, 15)) . date("dmY") . _set_padding_($var_hole, 2, "0", false); } else { return _set_input_string_(_set_padding_($var_userid, 15)) . date("dmY") . _set_padding_("1", 2, "0", false); } }
echo $var_array_pesan['qty']; ?> ", "<?php echo $var_class_pesan->var_total; ?> "); <?php } $var_class_pesan->_calculate_($var_notransaksi, ""); ?> _set_report_("<?php echo $var_notransaksi; ?> ", "<?php echo _set_field_value(def_table_pemakai, "username", "userid='" . _set_input_string_($var_class_pesan->var_userid) . "'"); ?> ", "<?php echo $var_class_pesan->var_tanggal; ?> ", "<?php echo $var_class_pesan->var_total; ?> "); </script> <?php require_once def_directory_modules . "pesan/" . "module_update.php"; } else { $session_error = "Harap Mengikuti Prosedur"; _set_session_register_("session_error");
function _set_harga_($var_menuid) { $var_query_link = _set_query_("SELECT * FROM " . def_table_daftarharga . " WHERE menuid='" . _set_input_string_($var_menuid) . "' ORDER BY tanggal DESC"); if (_get_num_rows_($var_query_link) > 0) { $var_array_daftarharga = _set_fetch_array_($var_query_link); return _set_double_($var_array_daftarharga['harga'], 0); } else { return 0; } }
function _delete_data2_($var_menuid) { if (!_is_not_null_($var_menuid)) { return false; } return _set_query_("DELETE FROM " . def_table_daftarharga . " WHERE menuid='" . _set_input_string_($var_menuid) . "'"); }