query($sSql)->fetch(); if (!$row) { return false; } $stateNew = ''; $enableNew = ''; if ($operation == 'delete') { if (!($row['state'] == 'a' and $row['enable'] == 'y')) { return false; } $stateNew = 'd'; $enableNew = 'y'; } else if ($operation == 'refuse') { if (!(($row['state'] == 'a' or $row['state'] == 'n') and $row['enable'] == 'y')) { return false; } if ($row['state'] == 'a') { $stateNew = 'r'; } else { $stateNew = 'x'; } $enableNew = 'y'; } else if ($operation == 'confirm') { if (!($row['state'] == 'a' and $row['enable'] == 'y')) { return false; } $stateNew = 'c'; $enableNew = 'y'; } else if ($operation == 'disable') { if (!($row['state'] == 'c' and $row['enable'] == 'y')) { return false; } $stateNew = 'c'; $enableNew = 'n'; } else if ($operation == 'enable') { if (!($row['state'] == 'c' and $row['enable'] == 'n')) { return false; } $stateNew = 'c'; $enableNew = 'y'; } $sSql = "UPDATE chain_shop SET state='" . $stateNew . "', enable='" . $enableNew . "', confrim_id='" . $g_userId . "', confrim_time=NOW() WHERE state='" . $row['state'] . "' AND enable='" . $row['enable'] . "' AND id=" . $id; $db->exec($sSql); return true; } function getChainShopStateHint($state, $enable) { if ($enable == 'y') { switch ($state) { case 'n': return '申请加盟连锁(账号待审批)'; break; case 'a': return '申请加盟连锁'; break; case 'd': return '已删除'; break; case 'x': return '已拒绝(账号审批未通过)'; break; case 'r': return '已拒绝'; break; case 'c': return '审核通过'; break; default: return '未知'; } } else { echo '失效'; } } /* $item : 行业出身/背景, industry_background 行业经历, industry_experience 合伙人入股形式, cooperation_mode 业务涉及, business_scope 擅长种类, good_at_type 擅长车型, good_at_car 宣传方式, publicity_mode 客户来源, customer_source 初始投入资金, initial_investment 多长时间达到首月收支平衡, balance_payment_time 现稳定车辆台数, shop_car_num 当地同行数量, counterpart_num 店铺技术在当地实力, technology_strength 当地改装氛围, refit_atmosphere 目前遇到问题, problem 运营资质, operation_qualification 维修厂资质, factory_qualification $type : radio, checkbox, select */ function editChainShopInput($value, $hint, $name, $id = '', $size = 0) { if ($id == '') { $id = $name; } $html = ''; $html .= '' . $hint . ':'; $html .= ''; if ($type == 'radio' and $aChainShopAttributeValue[$item]['type'] == 'radio') { foreach ($aChainShopAttributeValue[$item]['key_value'] as $key => $value) { $html .= ' $value) { $html .= ''; foreach ($aChainShopAttributeValue[$item]['key_value'] as $key => $value) { $html .= '