<?php ini_set('display_errors', 'off'); require_once 'include/session.php'; if ($_POST) { $name = addslashes($_POST['name']); $name_code = $_POST['name_code']; $address = addslashes($_POST['address']); $entity_type = addcslashes($_POST['entity_type']); session_start(); include "class.docket.php"; $obj = new docket(); $obj->add_app_client($name, $name_code, $address, $entity_type); } ?> <html> <head> <title>ADD Entity</title> <link rel="stylesheet" href="css/custom.css" /> <link rel="stylesheet" href="css/menu.css" /> <script src="js/jquery-1.8.3.min.js"></script> <script src="js/custom.js"></script> <style> #addEmail {background: none repeat scroll 0 0 #000000;color: #FFFFFF;padding: 3px;cursor: pointer;} .removeEmail {background: none repeat scroll 0 0 #8d8d8d;color: #FFFFFF;padding: 3px;cursor: pointer;} </style> </head> <body> <?php include_once 'include/menu.php'; ?>
<script src="js/jquery.fancybox.js"></script> <script src="js/custom.js"></script> <style> #addEmail {background: none repeat scroll 0 0 #000000;color: #FFFFFF;padding: 3px;cursor: pointer;} .removeEmail {background: none repeat scroll 0 0 #8d8d8d;color: #FFFFFF;padding: 3px;cursor: pointer;} </style> <?php if ($_POST) { $name = addslashes($_POST['name']); $name_code = $_POST['name_code']; $address = $_POST['address']; session_start(); include "class.docket.php"; $obj = new docket(); if ($_GET['pop'] == 'yes' && $_GET['current_ent'] == 'app_ent') { $entityid = $obj->add_app_client($name, $name_code, $address, 'yes'); $sql = "select auto_id,email from user_entity_email where user_id='{$entityid}'"; $res = mysql_query($sql); $emls = ''; while ($row = mysql_fetch_array($res)) { $auto_id = $row['auto_id']; $emailId = $row['email']; $emls .= '<option value=\\"' . $auto_id . '\\">' . htmlspecialchars($emailId) . '</option>'; } echo "<script>\r\n showTXT = '';\r\n \$(function() {\r\n parent.\$('#applicant').append(\"<option value='{$entityid}' selected='selected'>{$name}</option>\");\r\n showTXT= parent.\$('#applicant option:selected').text();\r\n parent.\$('#applicant').next().children('input ').val(showTXT);\r\n parent.\$('.applicant_ref_no').val(\"{$name_code}\");\r\n parent.\$('.client_mail').append('{$emls}');\r\n try {\r\n parent.jQuery.fancybox.close();\r\n } catch (err) {\r\n parent.\$('#fancybox-overlay').hide();\r\n parent.\$('#fancybox-wrap').hide();\r\n }\r\n });\r\n </script> \r\n "; } else { if ($_GET['pop'] == 'yes' && $_GET['current_ent'] == 'cli_ent') { $entityid = $obj->add_app_client($name, $name_code, $address, 'yes'); $sql = "select auto_id,email from user_entity_email where user_id='{$entityid}'"; $res = mysql_query($sql); $emls = '';