} if (empty($io->input['post']["passwd"])) { jsAlertMsg('登錄密碼錯誤!!'); } // Check Variable End require_once "saja/mysql.ini.php"; $model = new mysql($config["db"][0]); $model->connect(); $db_user = $config["db"][0]["dbname"]; //print_R($db_user);exit; require_once "saja/convertString.ini.php"; $str = new convertString(); ############################################################################################################################################## // Table Start $query = "SELECT * FROM `{$db_user}`.`{$config['default_prefix']}enterprise` \r\nWHERE \r\n\tprefixid = '" . $config['default_prefix_id'] . "' \r\n\tAND loginname = '" . $io->input['post']["name"] . "' \r\n\tAND switch = 'Y' \r\n"; $table = $model->getQueryRecord($query); if (empty($table['table']['record'])) { jsAlertMsg('登錄帳號不存在!!'); die; } $enterprise = $table['table']['record'][0]; $passwd = $str->strEncode($io->input['post']['passwd'], $config['encode_key']); if ($enterprise['passwd'] !== $passwd) { jsAlertMsg('登錄密碼錯誤!!'); } // Table End ############################################################################################################################################## $_SESSION['sajamanagement']['enterprise'] = $enterprise; setcookie('enterpriseid', $enterprise['enterpriseid'], time() + 86400, "/", COOKIE_DOMAIN); //set cookie for 1 day header("location:" . $config['default_main']);
if (!empty($tx_key)) { $arr = array(); $arr['tx_key'] = $tx_key; redirto('/management/webtx/vendorConfirm/', $arr); } else { redirto('/management/', ''); } } exit; } if (!empty($enterpriseid) && $login == "") { $model = new mysql($config["db"][0]); $model->connect(); $ret = getEnterprise($enterpriseid); if ($ret['code'] != 1) { jsAlertMsg($ret['msg']); return; } $enterprise = $ret['msg']; $_SESSION['sajamanagement']['enterprise'] = $enterprise; setcookie('enterpriseid', $enterprise['enterpriseid'], time() + 86400, "/", COOKIE_DOMAIN); //set cookie for 1 day setcookie('loginname', $enterprise['loginname'], time() + 86400, "/", COOKIE_DOMAIN); //set cookie for 1 day if (!empty($tx_key)) { $arr = array(); $arr['tx_key'] = $tx_key; redirto('/management/webtx/vendorConfirm/', $arr); } else { redirto('/management/', ''); }
if (empty($io->input['post']["name"])) { jsAlertMsg('管理帐号错误!!'); } if (empty($io->input['post']["passwd"])) { jsAlertMsg('管理密码错误!!'); } // Check Variable End require_once "saja/mysql.ini.php"; $model = new mysql($config["db"][0]); $model->connect(); $db_user = $config["db"][0]["dbname"]; //print_R($db_user);exit; require_once "saja/convertString.ini.php"; $str = new convertString(); ############################################################################################################################################## // Table Start $query = "\r\nSELECT * FROM `{$db_user}`.`{$config['default_prefix']}flash_admin` \r\nWHERE \r\n\tprefixid = '" . $config['default_prefix_id'] . "' \r\n\tAND loginname = '" . $io->input['post']["name"] . "' \r\n\tAND switch = 'Y' \r\n"; $table = $model->getQueryRecord($query); if (empty($table['table']['record'])) { jsAlertMsg('管理帐号不存在!!'); die; } $user = $table['table']['record'][0]; $passwd = $str->strEncode($io->input['post']['passwd'], $config['encode_key']); if ($user['passwd'] !== $passwd) { jsAlertMsg('管理密码错误!!'); } // Table End ############################################################################################################################################## $_SESSION['sajaflash']['flash_admin'] = $user; header("location:" . $config['default_main']);