function GetPage($res, $increment, $open_number, $queue) { echo $increment; if ($increment == '' && $res == '') { $increment = increment(incomming_call); } if ($queue == '') { $ch_queue = $res['dst_queue']; } else { $ch_queue = $queue; } $dis = ''; $checked = ''; if ($res != '') { $dis = 'disabled'; } else { $checked = 'checked'; } if ($res != '' && $res[client_status] == 1) { $data .= "<script>client_status('pers')</script>"; } elseif ($res != '' && $res[client_status] == 2) { $data .= "<script>client_status('iuri')</script>"; } $rr = mysql_fetch_array(mysql_query("SELECT scenario_id FROM queue WHERE number = '{$ch_queue}'")); $data .= ' <div id="dialog-form"> <fieldset style="width: 150px; float: left;"> <input id="scenario_id" type="hidden" value="' . $rr[0] . '" /> <table class="dialog-form-table"> <tr> <td style="width: 125px;"><label for="incomming_id">მომართვის №</label></td> </tr> <tr> <td><input disabled style="width: 125px;" id="incomming_id" type="text" value="' . ($res['id'] == '' ? $increment : $res['id']) . '"></td> </tr> <tr> <td style="width: 125px;"><label for="incomming_date">თარიღი</label></td> </tr> <tr> <td><input disabled style="width: 125px;" id="incomming_date" type="text" value="' . ($res['call_date'] == '' ? date("Y-m-d H:i:s") : $res['call_date']) . '"></td> </tr> <tr> <td><label for="incomming_phone">ტელეფონი</td> </tr> <tr> <td><input disabled style="width: 125px;" id="incomming_phone" type="text" value="' . $res['phone'] . '"></td> </tr> </table> <table class="dialog-form-table"> <tr> <td><label for="incomming_cat_1">ზარის კატეგორია</label></td> </tr> <tr> <td><select id="incomming_cat_1" style="width: 130px;">' . get_cat_1($res['cat_1']) . '</select></td> </tr> <tr> <td><label for="incomming_cat_1_1">ზარის ქვე-კატეგორია 1</label></td> </tr> <tr> <td><select id="incomming_cat_1_1" style="width: 130px;">' . get_cat_1_1($res['cat_1'], $res['cat_1_1']) . '</select></td> </tr> <tr> <td><label for="incomming_cat_1_1_1">ზარის ქვე-კატეგორია 2</label></td> </tr> <tr> <td><select id="incomming_cat_1_1_1" style="width: 130px;">' . get_cat_1_1_1($res['cat_1_1'], $res['cat_1_1_1']) . '</select></td> </tr> </table> <table class="dialog-form-table"> <tr> <td><label for="inc_status_id">რეაგირება</label></td> </tr> <tr> <td><select id="inc_status_id" style="width: 130px;">' . get_IncStatus($res['inc_status_id']) . '</select></td> </tr> <tr> <td><label for="incomming_comment">დამატებითი ინფორმაცია</label></td> </tr> <tr> <td><textarea id="incomming_comment" style="resize: vertical;width: 125px;height: 50px;">' . $res['comment'] . '</textarea></td> </tr> </table> </fieldset> <div id="side_menu" style="float: left;height: 520px;width: 80px;margin-left: 10px; background: #272727; color: #FFF;"> <spam class="info" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'info\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/info.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ინფო</div></spam> <spam class="scenar" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'scenar\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/scenar.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ბილინგი</div></spam> <spam class="task" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'task\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/task.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">დავალება</div></spam> <spam class="sms" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'sms\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/sms.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">SMS</div></spam> <spam class="mail" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'mail\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/mail.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">E-mail</div></spam> <spam class="record" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'record\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/record.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ჩანაწერი</div></spam> <spam class="file" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'file\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/file.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ფაილი</div></spam> <spam class="question" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'question\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/question.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">შეკითხვა</div></spam> </div> <div style="width: 900px;float: left;margin-left: 10px;" id="right_side"> <fieldset style="display:none;" id="info"> <span class="hide_said_menu">x</span> <table class="margin_top_10"> <tr> <td><label style="width: 280px;" for="in_sorce_info_id">ინფორმაციის წყარო</label></td> <td><label style="width: 280px;" for="in_service_center_id">მომსახურების ცენტრი</label></td> <td><label style="width: 280px;" for="in_district_id">უბანი</label></td> </tr> <tr> <td><select id="in_sorce_info_id" style="width: 245px;">' . getin_sorce_info_id($res['in_sorce_info_id']) . '</select></td> <td><select id="in_service_center_id" style="width: 245px;">' . getin_service_center_id($res['in_service_center_id']) . '</select></td> <td><select id="in_district_id" style="width: 245px;">' . getin_district_id($res['in_district_id']) . '</select></td> </tr> </table> <br> <hr style="width: 75%;position: absolute;margin-left: -11px;margin-top: 6px;"> <hr style="width: 75%;position: absolute;margin-left: -11px;border: 5px solid #fff;"> <hr style="width: 75%;position: absolute;margin-left: -11px;margin-top: 17px;"> <br> <table class="margin_top_10"> <tr> <td style="width: 280px;"><label for="cl_id">კანცელარიის ნომერი</label></td> <td style="width: 280px;"><label for="cl_name">განმცხადებელი</label></td> <td style="width: 240px;"><label for="in_type_id">ტიპი</label></td> </tr> <tr> <td><textarea style="width: 240px; resize: vertical;" id="cl_id" >' . $res['cl_id'] . '</textarea></td> <td><textarea style="width: 240px; resize: vertical;" id="cl_name" >' . $res['cl_name'] . '</textarea></td> <td><select style="width: 245px;" id="in_type_id">' . getin_type_id($res['in_type_id']) . '</select></td> </tr> <tr> <td style="width: 280px;"><label for="cl_ab">აბონენტი</label></td> <td style="width: 280px;"><label for="cl_ab_num">აბონენტის ნომერი</label></td> <td style="width: 240px;"><label for="cl_addres">მისამართი</label></td> </tr> <tr> <td><textarea style="width: 240px; resize: vertical;" id="cl_ab" >' . $res['cl_ab'] . '</textarea></td> <td><textarea style="width: 240px; resize: vertical;" id="cl_ab_num" maxlength="10" onkeypress=\'return event.charCode >= 48 && event.charCode <= 57\'>' . $res['cl_ab_num'] . '</textarea></td> <td><textarea style="width: 240px; resize: vertical;" id="cl_addres" >' . $res['cl_addres'] . '</textarea></td> </tr> <tr> <td style="width: 280px;"><label for="cl_phone">ტელეფონის ნომერი</label></td> <td style="width: 240px;"><label for="in_branch_id">ფილიალი</label></td> </tr> <tr> <td><textarea style="width: 240px; resize: vertical;" id="cl_phone" >' . $res['cl_phone'] . '</textarea></td> <td><select style="width: 245px;" id="in_branch_id">' . getin_branch_id($res['in_branch_id']) . '</select></td> </tr> </table> </fieldset> <fieldset style="display:none;" id="task"> <legend>დავალების ფორმირება</legend> <span class="hide_said_menu">x</span> <table> <tr> <td style="width: 280px;"><label for="task_controler_id">პასუხისმგებელი სამსახური</label></td> <td style="width: 280px;"><label for="task_recipient_id">პასუხისმგებელი პირი</label></td> <td style="width: 280px;"><label for="task_status_id">სტატუსი</label></td> </tr> <tr> <td><select style="width: 240px;" id="task_departament_id">' . GetDepartament($res[task_departament_id]) . '</select></td> <td><select style="width: 240px;" id="task_recipient_id">' . getUsers($res[task_recipient_id]) . '</select></td> <td><select style="width: 240px;" id="task_status_id">' . getStatusTask($res[task_status_id]) . '</select></td> </tr> <tr> <td><label for="task_start_date">ფორმირების თარიღი</label></td> <td><label for="task_start_date">პერიოდი</label></td> <td><label></label></td> </tr> <tr> <td><input style="float: left;width: 235px;" id="task_create_date" type="text" value="' . ($res[task_date] == '' ? date("Y-m-d h:i:s") : $res[task_date]) . '"></label></td> <td><input style="float: left;width: 235px;" id="task_start_date" type="text" value="' . $res[task_start_date] . '"><label for="task_start_date" style="float: left;margin-top: 7px;margin-left: 2px;">-დან</label></td> <td><input style="float: left;width: 235px;" id="task_end_date" type="text" value="' . $res[task_end_date] . '"><label for="task_end_date" style="float: left;margin-top: 7px;margin-left: 2px;">-მდე</label></td> </tr> <tr> <td><label for="task_description">კომენტერი</label></td> </tr> <tr> <td colspan=3><textarea style="resize: vertical;width: 800px;" id="task_description">' . $res[task_description] . '</textarea></td> </tr> <tr> <td><label for="task_note">შედეგი</label></td> </tr> <tr> <td colspan=3><textarea style="resize: vertical;width: 800px;" id="task_note">' . $res[task_note] . '</textarea></td> </tr> </table> </fieldset> <fieldset style="display:none;" id="sms"> <legend>SMS</legend> <span class="hide_said_menu">x</span> <div class="margin_top_10"> <div id="button_area"> <button id="add_sms">ახალი SMS</button> </div> <table class="display" id="table_sms" > <thead> <tr id="datatable_header"> <th>ID</th> <th style="width: 100%;">თარიღი</th> <th style="width: 100%;">ადრესატი</th> <th style="width: 100%;">ტექსტი</th> <th style="width: 100%;">სტატუსი</th> </tr> </thead> <thead> <tr class="search_header"> <th class="colum_hidden"> <input type="text" name="search_id" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_number" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> </tr> </thead> </table> </div> </fieldset> <fieldset style="display:none;" id="mail"> <legend>E-mail</legend> <span class="hide_said_menu">x</span> <div class="margin_top_10"> <div id="button_area"> <button id="add_mail">ახალი E-mail</button> </div> <table class="display" id="table_mail" > <thead> <tr id="datatable_header"> <th>ID</th> <th style="width: 100%;">თარიღი</th> <th style="width: 100%;">ადრესატი</th> <th style="width: 100%;">გზავნილი</th> <th style="width: 100%;">სტატუსი</th> </tr> </thead> <thead> <tr class="search_header"> <th class="colum_hidden"> <input type="text" name="search_id" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_number" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> </tr> </thead> </table> </div> </fieldset> <fieldset style="display:none;" id="record"> <legend>ჩანაწერები</legend> <span class="hide_said_menu">x</span> ' . show_record($res) . ' </fieldset> <fieldset style="display:none;" id="file"> <legend>ფაილი</legend> <span class="hide_said_menu">x</span> ' . show_file($res) . ' </fieldset> <fieldset style="display:none;" id="question"> <legend>ფაილი</legend> <span class="hide_said_menu">x</span> </fieldset>'; if ($rr[0] == '') { $my_scenario = $res['inc_scenario_id']; } else { $my_scenario = $rr[0]; } $query = mysql_query("SELECT \t`question`.id,\n \t\t\t\t `question`.`name`,\n \t\t\t\t `question`.note,\n `scenario`.`name`,\n \t\t `scenario_detail`.id AS sc_det_id,\n \t\t `scenario_detail`.`sort`\n FROM `scenario`\n JOIN scenario_detail ON scenario.id = scenario_detail.scenario_id\n JOIN question ON scenario_detail.quest_id = question.id\n WHERE scenario.id = {$my_scenario} AND scenario_detail.actived = 1\n ORDER BY scenario_detail.sort ASC"); $data .= ' <fieldset style="display:none;height: 600px;" id="scenar"> <legend>ბილინგი</legend> <iframe src="http://localhost:8080/epro/client-side/call/biling.php" style="width: 875px; height:600px;"></iframe> </fieldset> </div> </div><input type="hidden" value="' . $res[id] . '" id="hidden_id">'; return $data; }
function GetPage($res) { $data .= ' <div id="dialog-form"> <fieldset style="width: 430px; float: left;"> <legend>ძირითადი ინფორმაცია</legend> <input id="scenario_id" type="hidden" value="' . $res[scenario_id] . '" /> <table class="dialog-form-table"> <tr> <td>დამფორმირებელი :</td> <td>' . $res['main_username'] . '</td> <td></td> </tr> <tr> <td style="width: 150px;"><label for="incomming_id">მომართვის №</label></td> <td style="width: 150px;"><label for="incomming_date">შექმნის თარიღი</label></td> <td style="width: 150px;"><label for="incomming_date_up">შევსების თარიღი</label></td> </tr> <tr> <td><input style="width: 110px;" id="incomming_id" type="text" value="' . $res['id'] . '" disabled></td> <td><input style="width: 125px;" id="incomming_date" type="text" value="' . $res['create_date'] . '" disabled></td> <td><input style="width: 125px;" id="incomming_date_up" type="text" value="' . ($res['update_date'] != '' ? $res['update_date'] : date('Y-m-d H:i:s')) . '" disabled></td> </tr> </table> <table class="dialog-form-table"> <tr> <td style="width: 220px;"><label for="project">პროექტი</label></td> <td style="width: 195px;"><label for="scenario">სცენარი</label></td> </tr> <tr> <td><input style="width: 185px;" id="project" type="text" value="' . $res['project_name'] . '" disabled></td> <td><input style="width: 185px;" id="scenario" type="text" value="' . $res['scenario_name'] . '" disabled></td> </tr> </table> <table class="dialog-form-table"> <tr> <td style="width: 150px;"><label for="outgoing_status">სტატუსი</label></td> </tr> <tr> <td><select id="outgoing_status" style="width: 100%;">' . getStatusOut($res['status']) . '</select></td> </tr> <tr> <td style="width: 150px;"><label for="incomming_id">ზარის შესახებ</label></td> </tr> <tr> <td><textarea style="width: 407px; margin:0;resize:vertical;" id="call_comment" >' . $res['call_comment'] . '</textarea></td> </tr> </table> </fieldset> <div id="side_menu" style="float: left;height: 485px;width: 80px;margin-left: 10px; background: #272727; color: #FFF;margin-top: 6px;"> <spam class="scenar" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'scenar\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/scenar.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">სცენარი</div></spam> <spam class="info" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'info\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/info.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ინფო</div></spam> <spam class="task" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'task\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/task.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">დავალება</div></spam> <spam class="sms" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'sms\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/sms.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">SMS</div></spam> <spam class="mail" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'mail\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/mail.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">E-mail</div></spam> <spam class="record" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'record\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/record.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ჩანაწერი</div></spam> <spam class="file" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'file\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/file.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ფაილი</div></spam> </div> <div style="width: 619px;float: left;margin-left: 10px;" id="right_side"> <fieldset style="display:none;" id="info"> <legend>მომართვის ავტორი</legend> <span class="hide_said_menu">x</span> <div id="pers"> <table class="margin_top_10"> <tr> <td ' . ($res['pid'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_number">პირადი ნომერი</label></td> <td ' . ($res['id_code'] == '' ? 'style="display:none;"' : '') . '><label for="client_number">საიდენტ. ნომერი</label></td> </tr> <tr> <td ' . ($res['pid'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_number" type="text" value="' . $res['pid'] . '"></td> <td ' . ($res['id_code'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_number" type="text" value="' . $res['id_code'] . '"></td> </tr> <tr> <td ' . ($res['firstname'] == '' ? 'style="display:none;"' : '') . '><label for="client_lname">სახელი</label></td> <td ' . ($res['lastname'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_fname">გვარი</label></td> </tr> <tr> <td ' . ($res['firstname'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_lname" type="text" value="' . $res['firstname'] . '"></td> <td ' . ($res['lastname'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_fname" type="text" value="' . $res['lastname'] . '"></td> </tr> <tr> <td ' . ($res['phone1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_phone1">ტელეფონი 1</label></td> <td ' . ($res['phone2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_phone2">ტელეფონი 2</label></td> </tr> <tr> <td ' . ($res['phone1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_phone1" type="text" value="' . $res['phone1'] . '"></td> <td ' . ($res['phone2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_phone2" type="text" value="' . $res['phone2'] . '"></td> </tr> <tr> <td ' . ($res['mail1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_mail1">ელ-ფოსტა 1</label></td> <td ' . ($res['mail2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_mail2">ელ-ფოსტა 2</label></td> </tr> <tr> <td ' . ($res['mail1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_mail1" type="text" value="' . $res['mail1'] . '"></td> <td ' . ($res['mail2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_mail2" type="text" value="' . $res['mail2'] . '"></td> </tr> <tr> <td ' . ($res['address1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_addres1">მისამართი 1</label></td> <td ' . ($res['address2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_addres2">მისამართი 2</label></td> </tr> <tr> <td ' . ($res['address1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_addres1" type="text" value="' . $res['address1'] . '"></td> <td ' . ($res['address2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_addres2" type="text" value="' . $res['address2'] . '"></td> </tr> <tr> <td ' . ($res['note'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_note">შენიშვნა</label></td> <td ' . ($res['client_name'] == '' ? 'style="display:none;"' : '') . '><label for="client_name">კლიენტის დასახელება</label></td> </tr> <tr> <td ' . ($res['note'] == '' ? 'style="display:none;"' : '') . '><textarea id="client_person_note" style="resize: vertical;width: 250px;">' . $res['note'] . '</textarea></td> <td ' . ($res['client_name'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_name" type="text" value="' . $res['client_name'] . '"></td> </tr> </table> </div> </fieldset> <fieldset style="display:none;height: 465px;" id="scenar"> <legend>სცენარი</legend> <span class="hide_said_menu">x</span>'; $my_scenario = $res[scenario_id]; $query = mysql_query("SELECT \t`question`.id,\r\n \t `question`.`name`,\r\n \t `question`.note,\r\n \t `scenario`.`name`,\r\n \t `scenario_detail`.id AS sc_det_id,\r\n \t `scenario_detail`.`sort`\r\n \t FROM `scenario`\r\n \t JOIN scenario_detail ON scenario.id = scenario_detail.scenario_id\r\n \t JOIN question ON scenario_detail.quest_id = question.id\r\n \t WHERE scenario.id = {$my_scenario} AND scenario_detail.actived = 1\r\n \t ORDER BY scenario_detail.sort ASC"); $data .= ' <button who="0" id="show_all_scenario" style="float: right; margin-top: 15px;">ყველას ჩვენება</button><div class="clear"></div>'; if ($res[id] == '') { $inc_id = 0; $inc_checker = " AND scenario_results.outgoing_campaign_detail_id = 0"; } else { $inc_id = $res[id]; $inc_checker = " AND scenario_results.outgoing_campaign_detail_id = {$res['id']}"; } while ($row = mysql_fetch_array($query)) { $last_q = mysql_query(" SELECT question_detail.id\r\n \t FROM `question_detail`\r\n \t JOIN scenario_detail ON scenario_detail.quest_id = question_detail.quest_id\r\n \t AND scenario_detail.scenario_id = {$my_scenario}\r\n \t WHERE question_detail.quest_id = {$row['0']}"); $data .= '<div style="" class="quest_body ' . $row[5] . '" id="' . $row[0] . '"> <table class="dialog-form-table"> <tr> <td style="font-weight:bold;">' . $row[5] . '. ' . $row[1] . ' <img onclick="imnote(\'' . $row[5] . '\')" style="border: none;padding: 0;margin-left: 8px;margin-top: -7px;cursor: pointer;" src="media/images/icons/kitxva.png" alt="14 ICON" height="24" width="24"></td> </tr><tr style="display:none;" id="imnote_' . $row[5] . '" ><td>' . $row[2] . '</td></tr> '; while ($last_a = mysql_fetch_array($last_q)) { $query1 = mysql_query(" SELECT CASE \tWHEN question_detail.quest_type_id = 1 THEN CONCAT('<tr><td style=\"width:428px; text-align:left;\"><input next_quest=\"',scenario_destination.destination,'\" ',IF(scenario_results.outgoing_campaign_detail_id = {$inc_id} && question_detail.id = scenario_results.question_detail_id,'checked','') ,' class=\"check_input\" ansver_val=\"',question_detail.answer,'\" style=\"float:left;\" type=\"checkbox\" name=\"checkbox', question_detail.quest_id, '\" id=\"checkbox', question_detail.id, '\" value=\"', question_detail.id, '\"><label for=\"checkbox', question_detail.id, '\" style=\"float:left; padding: 7px;white-space: pre-line;\">', question_detail.answer, '</label></td></tr>')\r\n \t WHEN question_detail.quest_type_id = 2 THEN CONCAT('<tr><td style=\"width:428px; text-align:left;\"><label style=\"float:left; padding: 7px 0;width: 428px;\" for=\"input|', question_detail.quest_id, '|', question_detail.id, '\">',question_detail.answer,'</label><input next_quest=\"',scenario_destination.destination,'\" value=\"',IF(scenario_results.outgoing_campaign_detail_id = {$inc_id} && question_detail.id = scenario_results.question_detail_id,scenario_results.additional_info,''),'\" class=\"inputtext\"style=\"float:left;\" type=\"text\" id=\"input|', question_detail.quest_id, '|', question_detail.id, '\" q_id=\"',question_detail.id,'\" /> </td></tr>')\r\n \t WHEN question_detail.quest_type_id = 4 THEN CONCAT('<tr><td style=\"width:428px; text-align:left;\"><input next_quest=\"',scenario_destination.destination,'\" ',IF(scenario_results.outgoing_campaign_detail_id = {$inc_id} && question_detail.id = scenario_results.question_detail_id,'checked','') ,' class=\"radio_input\" ansver_val=\"',question_detail.answer,'\" style=\"float:left;\" type=\"radio\" name=\"radio', question_detail.quest_id, '\" id=\"radio', question_detail.id, '\" value=\"', question_detail.id, '\"><label for=\"radio', question_detail.id, '\" style=\"float:left; padding: 7px;white-space: pre-line;\">', question_detail.answer, '</label></td></tr>')\r\n \t WHEN question_detail.quest_type_id = 5 THEN CONCAT('<tr><td style=\"width:428px; text-align:left;\"><label style=\"float:left; padding: 7px 0;width: 428px;\" for=\"input|', question_detail.quest_id, '|', question_detail.id, '\">',question_detail.answer,'</label><input next_quest=\"',scenario_destination.destination,'\" value=\"',IF(scenario_results.outgoing_campaign_detail_id = {$inc_id} && question_detail.id = scenario_results.question_detail_id,scenario_results.additional_info,''),'\" class=\"date_input\" style=\"float:left;\" type=\"text\" id=\"input|', question_detail.quest_id, '|', question_detail.id, '\" q_id=\"',question_detail.id,'\" /> </td></tr>')\r\n \t WHEN question_detail.quest_type_id = 6 THEN CONCAT('<tr><td style=\"width:428px; text-align:left;\"><label style=\"float:left; padding: 7px 0;width: 428px;\" for=\"input|', question_detail.quest_id, '|', question_detail.id, '\">',question_detail.answer,'</label><input next_quest=\"',scenario_destination.destination,'\" value=\"',IF(scenario_results.outgoing_campaign_detail_id = {$inc_id} && question_detail.id = scenario_results.question_detail_id,scenario_results.additional_info,''),'\" class=\"date_time_input\" style=\"float:left;\" type=\"text\" id=\"input|', question_detail.quest_id, '|', question_detail.id, '\" q_id=\"',question_detail.id,'\" /> </td></tr>')\r\n \t WHEN question_detail.quest_type_id = 7 THEN question_detail.answer\r\n \t END AS `ans`,\r\n \t question_detail.quest_type_id,\r\n \t scenario_handbook.`name`,\r\n \t scenario_results.additional_info,\r\n \t question_detail.quest_id,\r\n \t question_detail.id,\r\n \t scenario_destination.destination\r\n \t FROM question_detail\r\n \t LEFT JOIN scenario_results ON question_detail.id = scenario_results.question_detail_id {$inc_checker}\r\n \t LEFT JOIN outgoing_campaign_detail ON outgoing_campaign_detail.id = scenario_results.outgoing_campaign_detail_id\r\n \t JOIN scenario_detail ON scenario_detail.scenario_id = {$my_scenario} AND scenario_detail.actived = 1\r\n \t JOIN scenario_destination ON scenario_detail.id = scenario_destination.scenario_detail_id AND scenario_destination.answer_id = {$last_a['0']}\r\n \t LEFT JOIN scenario_handbook ON question_detail.answer = scenario_handbook.id\r\n \t WHERE question_detail.id = {$last_a['0']}\r\n \t "); $g = 0; while ($row1 = mysql_fetch_array($query1)) { $q_type = $row1[1]; if ($q_type == 7) { $data .= ' <tr> <td style="width:428px; text-align:left;"> <label style="float:left; padding: 7px 0;width: 428px;" for="">' . $row1[2] . '</label> <select class="hand_select" next_quest="' . $row1[6] . '" style="float:left;width: 235px;" id="hand_select|' . $row1[4] . '|' . $row1[5] . '" >' . gethandbook($row1[0], $row1[3]) . '</select> </td>'; } else { $data .= $row1[0]; } } } $data .= '</table> <hr class="myhr"><br></div>'; } $data .= ' <div style="margin-top: 15px; display: none;" class="last_quest"> <table class="dialog-form-table"> <tr> <td style="font-weight:bold;"> არ დაგავიწყდეთ სტატუსის შეცვლა და შენახვის ღილაკზე დაკლიკება! </td> </tr> </table> <hr> <br> </div> <button id="back_quest" back_id="0" style="float:left;">უკან</button><button id="next_quest" style="float:right;" next_id="0">წინ</button> </fieldset> <fieldset style="display:none;" id="task"> <legend>დავალების ფორმირება</legend> <span class="hide_said_menu">x</span> <table> <tr> <td><label for="task_type_id">დავალების ტიპი</label></td> </tr> <tr> <td colspan=2><select style="width: 595px;" id="task_type_id">' . GetTaskType() . '</select></td> </tr> <tr> <td><label for="task_start_date">პერიოდი</label></td> </tr> <tr> <td style="width: 350px;"><input style="float: left;" id="task_start_date" type="text" value=""><label for="task_start_date" style="float: left;margin-top: 7px;margin-left: 2px;">-დან</label></td> <td><input style="float: left;" id="task_end_date" type="text" value=""><label for="task_end_date" style="float: left;margin-top: 7px;margin-left: 2px;">-მდე</label></td> </tr> <tr> <td><label for="task_departament_id">განყოფილება</label></td> </tr> <tr> <td colspan=2><select style="width: 595px;" id="task_departament_id">' . GetDepartament() . '</select></td> </tr> <tr> <td><label for="task_recipient_id">ადრესატი</label></td> <td><label for="task_controler_id">მაკონტროლებელი</label></td> </tr> <tr> <td><select style="width: 245px;" id="task_recipient_id">' . getUsers() . '</select></td> <td><select style="width: 245px;" id="task_controler_id">' . getUsers() . '</select></td> </tr> <tr> <td><label for="task_priority_id">პრიორიტეტი</label></td> <td><label for="task_status_id">სტატუსი</label></td> </tr> <tr> <td><select style="width: 245px;" id="task_priority_id">' . GetPriority() . '</select></td> <td><select style="width: 245px;" id="task_status_id">' . getStatusTask() . '</select></td> </tr> <tr> <td><label for="task_description">აღწერა</label></td> </tr> <tr> <td colspan=2><textarea style="resize: vertical;width: 589px;" id="task_description"></textarea></td> </tr> <tr> <td><label for="task_note">შენიშვნა</label></td> </tr> <tr> <td colspan=2><textarea style="resize: vertical;width: 589px;" id="task_note"></textarea></td> </tr> </table> </fieldset> <fieldset style="display:none;" id="sms"> <legend>SMS</legend> <span class="hide_said_menu">x</span> <div class="margin_top_10"> <div id="button_area"> <button id="add_sms">ახალი SMS</button> </div> <table class="display" id="table_sms" > <thead> <tr id="datatable_header"> <th>ID</th> <th style="width: 100%;">თარიღი</th> <th style="width: 100%;">ადრესატი</th> <th style="width: 100%;">ტექსტი</th> <th style="width: 100%;">სტატუსი</th> </tr> </thead> <thead> <tr class="search_header"> <th class="colum_hidden"> <input type="text" name="search_id" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_number" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> </tr> </thead> </table> </div> </fieldset> <fieldset style="display:none;" id="mail"> <legend>E-mail</legend> <span class="hide_said_menu">x</span> <div class="margin_top_10"> <div id="button_area"> <button id="add_mail">ახალი E-mail</button> </div> <table class="display" id="table_mail" > <thead> <tr id="datatable_header"> <th>ID</th> <th style="width: 100%;">თარიღი</th> <th style="width: 100%;">ადრესატი</th> <th style="width: 100%;">გზავნილი</th> <th style="width: 100%;">სტატუსი</th> </tr> </thead> <thead> <tr class="search_header"> <th class="colum_hidden"> <input type="text" name="search_id" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_number" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> <th> <input type="text" name="search_date" value="ფილტრი" class="search_init" /> </th> </tr> </thead> </table> </div> </fieldset> <fieldset style="display:none;" id="record"> <legend>ჩანაწერები</legend> <span class="hide_said_menu">x</span> ' . show_record($res) . ' </fieldset> <fieldset style="display:none;" id="file"> <legend>ფაილი</legend> <span class="hide_said_menu">x</span> ' . show_file($res) . ' </fieldset></div> </fieldset> </div> </div><input type="hidden" value="' . $res[id] . '" id="hidden_id">'; return $data; }
function GetPage($res) { $user_gr = $_SESSION['USERGR']; $dis = 'disabled'; switch ($user_gr) { case '1': $dis = ''; break; case '2': $dis = ''; break; case '5': $dis = ''; break; case '4': $dis = 'disabled'; break; case '6': $dis = 'disabled'; break; } if ($res != '' && $res[client_status] == 1) { $data .= "<script>client_status('pers')</script>"; } elseif ($res != '' && $res[client_status] == 2) { $data .= "<script>client_status('iuri')</script>"; } if ($_REQUEST['im_inc'] == 1) { $dammale = "display:none;"; } else { $dammale = ''; } $data .= ' <div id="dialog-form"> <fieldset style="width: 430px; float: left;"> <legend>ძირითადი ინფორმაცია</legend> <table> <tr> <td style="width: 220px;"><label for="task_controler_id">პასუხისმგებელი სამსახური</label></td> <td style="width: 220px;"><label for="task_recipient_id">პასუხისმგებელი პირი</label></td> </tr> <tr> <td><select style="width: 200px;" id="task_departament_id" ' . $dis . '>' . GetDepartament($res[task_departament_id]) . '</select></td> <td><select style="width: 200px;" id="task_recipient_id" ' . $dis . '>' . getUsers($res[task_recipient_id]) . '</select></td> </tr> <tr> <td style="width: 160px;"><label for="task_status_id">სტატუსი</label></td> <td><label for="task_start_date">ფორმირების თარიღი</label></td> </tr> <tr> <td><select style="width: 200px;" id="task_status_id">' . getStatusTask($res[task_status_id]) . '</select></td> <td><input ' . $dis . ' style="float: left;width: 130px;" id="task_create_date" type="text" value="' . ($res[task_date] == '' ? date("Y-m-d h:i:s") : $res[task_date]) . '" disabled></label></td> </tr> <tr> <td><label for="task_start_date">პერიოდი</label></td> <td><label></label></td> </tr> <tr> <td><input ' . $dis . ' style="float: left;width: 130px;" id="task_start_date" type="text" value="' . $res[task_start_date] . '"><label for="task_start_date" style="float: left;margin-top: 7px;margin-left: 2px;">-დან</label></td> <td><input ' . $dis . ' style="float: left;width: 130px;" id="task_end_date" type="text" value="' . $res[task_end_date] . '"><label for="task_end_date" style="float: left;margin-top: 7px;margin-left: 2px;">-მდე</label></td> </tr> <tr> <td><label for="original_phone">ტელეფონი</label></td> </tr> <tr> <td colspan=2><textarea disabled style="resize: vertical;width: 410px;" id="original_phone">' . $res[phone] . '</textarea></td> </tr> <tr> <td><label for="task_description">კომენტერი</label></td> </tr> <tr> <td colspan=2><textarea ' . $dis . ' style="resize: vertical;width: 410px;" id="task_description">' . $res[task_description] . '</textarea></td> </tr> <tr> <td><label for="task_note">შედეგი</label></td> </tr> <tr> <td colspan=2><textarea style="resize: vertical;width: 410px;" id="task_note">' . $res[task_note] . '</textarea></td> </tr> </table> </fieldset> <div id="side_menu" style="' . $dammale . ' float: left;height: 485px;width: 80px;margin-left: 10px; background: #272727; color: #FFF;margin-top: 6px;"> <spam class="info" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'info\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/info.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ინფო</div></spam> <spam class="record" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'record\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/record.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ჩანაწერი</div></spam> <spam class="file" style="display: block;padding: 10px 5px; cursor: pointer;" onclick="show_right_side(\'file\')"><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/file.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">ფაილი</div></spam> </div> <div style="width: 615px;float: left;margin-left: 10px;" id="right_side"> <fieldset style="display:none; width: 675px;" id="info"> <legend>მომართვის ავტორი</legend> <span class="hide_said_menu">x</span>'; if ($res['incomming_call_id'] == '') { $data .= '<div id="pers"> <table class="margin_top_10"> <tr> <td ' . ($res['pid'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_number">პირადი ნომერი</label></td> <td ' . ($res['id_code'] == '' ? 'style="display:none;"' : '') . '><label for="client_number">საიდენტ. ნომერი</label></td> </tr> <tr> <td ' . ($res['pid'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_number" type="text" value="' . $res['pid'] . '"></td> <td ' . ($res['id_code'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_number" type="text" value="' . $res['id_code'] . '"></td> </tr> <tr> <td ' . ($res['firstname'] == '' ? 'style="display:none;"' : '') . '><label for="client_lname">სახელი</label></td> <td ' . ($res['lastname'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_fname">გვარი</label></td> </tr> <tr> <td ' . ($res['firstname'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_lname" type="text" value="' . $res['firstname'] . '"></td> <td ' . ($res['lastname'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_fname" type="text" value="' . $res['lastname'] . '"></td> </tr> <tr> <td ' . ($res['phone1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_phone1">ტელეფონი 1</label></td> <td ' . ($res['phone2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_phone2">ტელეფონი 2</label></td> </tr> <tr> <td ' . ($res['phone1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_phone1" type="text" value="' . $res['phone1'] . '"></td> <td ' . ($res['phone2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_phone2" type="text" value="' . $res['phone2'] . '"></td> </tr> <tr> <td ' . ($res['mail1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_mail1">ელ-ფოსტა 1</label></td> <td ' . ($res['mail2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_mail2">ელ-ფოსტა 2</label></td> </tr> <tr> <td ' . ($res['mail1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_mail1" type="text" value="' . $res['mail1'] . '"></td> <td ' . ($res['mail2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_mail2" type="text" value="' . $res['mail2'] . '"></td> </tr> <tr> <td ' . ($res['address1'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_addres1">მისამართი 1</label></td> <td ' . ($res['address2'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_addres2">მისამართი 2</label></td> </tr> <tr> <td ' . ($res['address1'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_addres1" type="text" value="' . $res['address1'] . '"></td> <td ' . ($res['address2'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_person_addres2" type="text" value="' . $res['address2'] . '"></td> </tr> <tr> <td ' . ($res['note'] == '' ? 'style="display:none;"' : '') . '><label for="client_person_note">შენიშვნა</label></td> <td ' . ($res['client_name'] == '' ? 'style="display:none;"' : '') . '><label for="client_name">კლიენტის დასახელება</label></td> </tr> <tr> <td ' . ($res['note'] == '' ? 'style="display:none;"' : '') . '><textarea id="client_person_note" style="resize: vertical;width: 250px;">' . $res['note'] . '</textarea></td> <td ' . ($res['client_name'] == '' ? 'style="display:none;"' : '') . '><input style="width: 250px;" id="client_name" type="text" value="' . $res['client_name'] . '"></td> </tr> </table> </div>'; } else { $data .= '<div id="pers"><table class="margin_top_10"> <tr> <td><label style="width: 220px;" for="in_sorce_info_id">ინფორმაციის წყარო</label></td> <td><label style="width: 220px;" for="in_service_center_id">მომსახურების ცენტრი</label></td> <td><label style="width: 220px;" for="in_district_id">უბანი</label></td> </tr> <tr> <td><select id="in_sorce_info_id" style="width: 205px;" ' . $dis . '>' . getin_sorce_info_id($res['source_info_id']) . '</select></td> <td><select id="in_service_center_id" style="width: 205px;" ' . $dis . '>' . getin_service_center_id($res['service_center_id']) . '</select></td> <td><select id="in_district_id" style="width: 205px;" ' . $dis . '>' . getin_district_id($res['in_district_id']) . '</select></td> </tr> </table> <br> <hr style="width: 55%;position: absolute;margin-left: -11px;margin-top: 6px;"> <hr style="width: 55%;position: absolute;margin-left: -11px;border: 5px solid #fff;"> <hr style="width: 55%;position: absolute;margin-left: -11px;margin-top: 17px;"> <br> <table class="margin_top_10"> <tr> <td style="width: 220px;"><label for="cl_id">კანცელარიის ნომერი</label></td> <td style="width: 220px;"><label for="cl_name">განმცხადებელი</label></td> <td style="width: 220px;"><label for="in_type_id">ტიპი</label></td> </tr> <tr> <td><textarea style="width: 200px; resize: vertical;" id="cl_id" ' . $dis . '>' . $res['cl_id'] . '</textarea></td> <td><textarea style="width: 200px; resize: vertical;" id="cl_name" ' . $dis . '>' . $res['cl_name'] . '</textarea></td> <td><select style="width: 205px;" id="in_type_id" ' . $dis . '>' . getin_type_id($res['in_type_id']) . '</select></td> </tr> <tr> <td style="width: 220px;"><label for="cl_ab">აბონენტი</label></td> <td style="width: 220px;"><label for="cl_ab_num">აბონენტის ნომერი</label></td> <td style="width: 220px;"><label for="cl_addres">მისამართი</label></td> </tr> <tr> <td><textarea style="width: 200px; resize: vertical;" id="cl_ab" ' . $dis . '>' . $res['cl_ab'] . '</textarea></td> <td><textarea style="width: 200px; resize: vertical;" id="cl_ab_num" maxlength="10" onkeypress=\'return event.charCode >= 48 && event.charCode <= 57\' ' . $dis . '>' . $res['cl_ab_num'] . '</textarea></td> <td><textarea style="width: 200px; resize: vertical;" id="cl_addres" ' . $dis . '>' . $res['cl_addres'] . '</textarea></td> </tr> <tr> <td style="width: 220px;"><label for="cl_phone">ტელეფონის ნომერი</label></td> <td style="width: 220px;"><label for="in_branch_id">ფილიალი</label></td> </tr> <tr> <td><textarea style="width: 200px; resize: vertical;" id="cl_phone" ' . $dis . '>' . $res['cl_phone'] . '</textarea></td> <td><select style="width: 205px;" id="in_branch_id" ' . $dis . '>' . getin_branch_id($res['branch_id']) . '</select></td> </tr> </table> </div> <div id="iuri" style="border: 1px solid #ccc;padding: 5px;margin-top: 20px;display:none;"> <span class="client_main" onclick="show_main(\'client_main\',this)" style="border: 1px solid #ccc;border-bottom: 1px solid #F1F1F1;cursor: pointer;margin-top: -32px;margin-left: -6px;display: block;width: 100px;padding: 5px;text-align: center;">ძირითადი</span> <span class="client_other" onclick="show_main(\'client_other\',this)" style="cursor: pointer;margin-top: -27px;margin-left: 108px;display: block;width: 125px;padding: 6px;text-align: center;">წარმომადგენელი</span> <div id="client_main"> <table class="margin_top_10"> <tr> <td><label for="client_number">საიდენტ. ნომერი</label></td> <td></td> </tr> <tr> <td><input style="width: 483px;" id="client_number" type="text" value="' . $res['client_number'] . '"></td> <td><button id="client_checker" style="margin-left: 5px;">შემოწმება</button></td> </tr> </table> <table class="margin_top_10"> <tr> <td><label for="client_name">დასახელება</label></td> </tr> <tr> <td><input style="width: 565px;" id="client_name" type="text" value="' . $res['client_name1'] . '"></td> </tr> </table> <table class="margin_top_10"> <tr> <td style="width: 312px;"><label for="client_phone1">ტელეფონი 1</label></td> <td><label for="client_phone2">ტელეფონი 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_phone1" type="text" value="' . $res['client_phone1'] . '"></td> <td><input style="width: 250px;" id="client_phone2" type="text" value="' . $res['client_phone2'] . '"></td> </tr> <tr> <td style="width: 312px;"><label for="client_mail1">ელ-ფოსტა 1</label></td> <td><label for="client_mail2">ელ-ფოსტა 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_mail1" type="text" value="' . $res['client_mail1'] . '"></td> <td><input style="width: 250px;" id="client_mail2" type="text" value="' . $res['client_mail2'] . '"></td> </tr> <tr> <td style="width: 312px;"><label for="client_addres1">მისამართი 1</label></td> <td><label for="client_person_addres2">მისამართი 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_addres1" type="text" value="' . $res['client_addres1'] . '"></td> <td><input style="width: 250px;" id="client_addres2" type="text" value="' . $res['client_addres2'] . '"></td> </tr> </table> <table class="margin_top_10"> <tr> <td><label for="client_note">შენიშვნა</label></td> </tr> <tr> <td><textarea id="client_note" style="resize: vertical;width: 565px;">' . $res['client_note'] . '</textarea></td> </tr> </table> </div> <div id="client_other" style="display:none;"> <table class="margin_top_10"> <tr> <td><label for="client_person_number">პირადი ნომერი</label></td> </tr> <tr> <td><input style="width: 565px;" id="client_person_number" type="text" value="' . $res['client_person_number'] . '"></td> </tr> </table> <table class="margin_top_10"> <tr> <td style="width: 312px;"><label for="client_lname">სახელი</label></td> <td><label for="client_person_fname">გვარი</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_person_lname" type="text" value="' . $res['client_person_lname'] . '"></td> <td><input style="width: 250px;" id="client_person_fname" type="text" value="' . $res['client_person_fname'] . '"></td> </tr> </table> <table class="margin_top_10"> <tr> <td style="width: 312px;"><label for="client_person_phone1">ტელეფონი 1</label></td> <td><label for="client_person_phone2">ტელეფონი 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_person_phone1" type="text" value="' . $res['client_person_phone1'] . '"></td> <td><input style="width: 250px;" id="client_person_phone2" type="text" value="' . $res['client_person_phone2'] . '"></td> </tr> <tr> <td style="width: 312px;"><label for="client_person_mail1">ელ-ფოსტა 1</label></td> <td><label for="client_person_mail2">ელ-ფოსტა 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_person_mail1" type="text" value="' . $res['client_person_mail1'] . '"></td> <td><input style="width: 250px;" id="client_person_mail2" type="text" value="' . $res['client_person_mail2'] . '"></td> </tr> <tr> <td style="width: 312px;"><label for="client_person_addres1">მისამართი 1</label></td> <td><label for="client_person_addres2">მისამართი 2</label></td> </tr> <tr> <td><input style="width: 250px;" id="client_person_addres1" type="text" value="' . $res['client_person_addres1'] . '"></td> <td><input style="width: 250px;" id="client_person_addres2" type="text" value="' . $res['client_person_addres2'] . '"></td> </tr> </table> <table class="margin_top_10"> <tr> <td><label for="client_person_note">შენიშვნა</label></td> </tr> <tr> <td><textarea id="client_person_note" style="resize: vertical;width: 565px;">' . $res['client_person_note'] . '</textarea></td> </tr> </table> </div> </div>'; } $data .= '</fieldset> <fieldset style="display:none;" id="record"> <legend>ჩანაწერები</legend> <span class="hide_said_menu">x</span> ' . show_record($res) . ' </fieldset> <fieldset style="display:none; width:600px;" id="file"> <legend>ფაილი</legend> <span class="hide_said_menu">x</span> ' . show_file($res) . ' </fieldset></div> </fieldset> </div> </div><input type="hidden" value="' . $res[id] . '" id="id">'; $inc = mysql_fetch_array(mysql_query(" SELECT `id`+1 AS id\r\n FROM `task`\r\n ORDER BY `id` DESC\r\n LIMIT 1")); $data .= '<input type="hidden" value="' . $inc[0] . '" id="id_inc">'; return $data; }