Example #1
0
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;
}
Example #2
0
function GetPage($res, $increment, $open_number, $queue)
{
    if ($open_number != '') {
        $phone_check = mysql_fetch_array(mysql_query("  SELECT  `name` AS `cl_ab`,\n                                                                `client_number` AS `cl_ab_num`,\n                                                                `client_phone` AS `cl_phone`\n                                                        FROM    `caller_history`\n                                                        WHERE   `phone` = '{$open_number}'"));
    }
    //    $phone_check = '';
    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>";
    }
    if ($_SESSION['USERGR'] == 5 || $_SESSION['USERID'] == 6) {
        $disa = "disabled";
    }
    //$rr = mysql_fetch_array(mysql_query("SELECT scenario_id FROM queue WHERE number = '2471707'"));
    $data .= '
	<div id="dialog-form">
	    <fieldset style="width: 150px;  float: left;">
	       <input id="scenario_id" type="hidden" value="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="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: 285px;">' . $res['comment'] . '</textarea></td>
	           </tr>
	       </table>
	       
	    </fieldset>
	    
	    
        <div id="side_menu" style="float: left;height: 585px;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=""><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>
	       <spam class="box" style="display: block;padding: 10px 5px;  cursor: pointer;" onclick=""><img style="padding-left: 22px;padding-bottom: 5px;" src="media/images/icons/box.png" alt="24 ICON" height="24" width="24"><div style="text-align: center;">კანცელა<br>რია</div></spam>
       </div>
	    
	    <div style="width: 900px;float: left;margin-left: 10px;" id="right_side">
            <fieldset style="display:block;" id="info">
	            <span class="hide_said_menu">x</span>
	                   
	                    
                        <table class="margin_top_10">
    	                   <tr>
        	                   <td><label style="width: 280px;" for="source_info_id">მეთოდი</label></td>
        	                   <td><label style="width: 280px;" for="service_center_id">მომსახურების ცენტრი</label></td>
        	                   <td><label style="width: 280px;" for="in_district_id">უბანი</label></td>
            	           </tr>
            	           <tr>
            	               <td><select id="source_info_id" style="width: 245px;">' . getsource_info_id($res['source_info_id']) . '</select></td>
            	               <td><select id="service_center_id" style="width: 245px;">' . getservice_center_id($res['service_center_id']) . '</select></td>
            	               <td><select id="in_district_id" style="width: 245px;">' . getin_district_id($res['service_center_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><input type="text" style="width: 240px; resize: vertical;" id="cl_id" value="' . $res['cl_id'] . '"></td>
                               <td><input type="text" style="width: 240px; resize: vertical;" id="cl_name" value="' . $res['cl_name'] . '"></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_num">აბონენტის ნომერი</label></td>
                               <td style="width: 280px;"><label for="cl_ab">აბონენტი</label></td>
	                           <td style="width: 240px;"><label for="cl_debt">მიმდინარე დავალიანება</label></td>
                           </tr>
                           <tr>
                               <td><input type="text" style="width: 200px; resize: vertical;float: left;" id="cl_ab_num" maxlength="10" onkeypress=\'return event.charCode >= 48 && event.charCode <= 57\' value="' . ($res['cl_ab_num'] == '' ? $phone_check[1] : $res[cl_ab_num]) . '"> <button id="go" style="cursor: pointer;float: right;margin-right: 34px;border: 0;padding: 7px;background: green;">GO</button></td>
                               <td><input type="text" style="width: 240px; resize: vertical;" id="cl_ab" value="' . ($res['cl_ab'] == '' ? $phone_check[0] : $res[cl_ab]) . '"></td>
                               <td><input type="text" style="width: 240px; resize: vertical;" id="cl_debt" value="' . $res['cl_debt'] . '"></td>
                           </tr>
                           <tr>
                               <td style="width: 280px;"><label for="cl_phone">ტელეფონის ნომერი</label></td>
	                           <td style="width: 240px;"><label for="branch_id">ფილიალი</label></td>
                               <td style="width: 240px;"><label for="cl_addres">მისამართი</label></td>
                           </tr>
                           <tr>
                               <td><input type="text" style="width: 240px; resize: vertical;" id="cl_phone" value="' . ($res['cl_phone'] == '' ? $phone_check[2] : $res[cl_phone]) . '"></td>
                               <td><select style="width: 245px;" id="branch_id">' . getbranch_id($res['service_center_id']) . '</select></td>
                               <td><input type="text" style="width: 240px; resize: vertical;" id="cl_addres" value="' . $res['cl_addres'] . '"></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><label style="width: 280px;" for="incomming_cat_1">ზარის კატეგორია</label></td>
            	               <td><label style="width: 280px;" for="incomming_cat_1_1">ზარის ქვე-კატეგორია 1</label></td>
	                           <td><label style="width: 280px;" for="incomming_cat_1_1_1">ზარის ქვე-კატეგორია 2</label></td>
            	           </tr>
            	           <tr>
	                           <td><select id="incomming_cat_1" style="width: 245px;">' . get_cat_1($res['cat_1']) . '</select></td>
            	               <td><select id="incomming_cat_1_1" style="width: 245px;">' . get_cat_1_1($res['cat_1'], $res['cat_1_1']) . '</select></td>
            	               <td><select id="incomming_cat_1_1_1" style="width: 245px;">' . get_cat_1_1_1($res['cat_1_1'], $res['cat_1_1_1']) . '</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>
            	        <div id="check_history" style="padding-top: 15px;">
            	            <div style="float: left; width: 878px;">
        	                <span style="float: left;">
                            <label for="start_check" style="margin-left: 110px;">-დან</label>
                            <input class="callapp_filter_body_span_input date_input" type="text" id="start_check" style="width: 100px;" value="' . date('Y-m-d', strtotime('-10 days')) . '">
                            </span>
                            <span style="float: left;margin-left: 12px;">
                            <label for="end_check" style="margin-left: 110px;">-მდე</label>
                            <input class="callapp_filter_body_span_input date_input" type="text" id="end_check" style="width: 100px;" value="' . date('Y-m-d') . '">
                            </span>
            	            <span style="float: left;margin-left: 12px;">
                            <label for="check_ab" style="margin-left: 195px;">აბონენტი</label>
                            <input class="callapp_filter_body_span_input" type="text" id="check_ab" style="width: 185px;">
                            </span>
                            <span style="margin-left: 25px;float: left;">
                            <select id="task_status_ck" style="width: 240px;">' . getStatusTaskCK() . '</select>
                            </span>
            	            </div>
            	            <table class="display" id="table_history" style="width: 100%;">
                                <thead>
                                    <tr id="datatable_header">
                                        <th>ID</th>
                                        <th style="width: 120px;">თარიღი</th>
                                        <th style="width: 120px;">აბონენტიოს ნომერი</th>
                                        <th style="width: 25%;">ტელეფონის ნომერი</th>
                                        <th style="width: 25%;">კომენტარი</th>
                                        <th style="width: 25%;">შედეგი</th>
                                        <th style="width: 25%;">სტატუსი</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_category" value="ფილტრი" class="search_init" />
                                        </th>            
                                        <th>
                                            <input type="text" name="search_category" value="ფილტრი" class="search_init" />
                                        </th>
                                        <th>
                                            <input type="text" name="search_category" value="ფილტრი" class="search_init" />
                                        </th>
                                        <th>
                                            <input type="text" name="search_phone" value="ფილტრი" class="search_init" />
                                        </th>
                                        <th>
                                            <input type="text" name="search_category" value="ფილტრი" class="search_init" />
                                        </th>
            	                        <th>
                                            <input type="text" name="search_category" value="ფილტრი" class="search_init" />
                                        </th>          
                                    </tr>
                                </thead>
                            </table>
            	        </div>
	    
            </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_status_id">სტატუსი</label></td>
                       <td style="width: 280px;"><label for="task_send">ფორმირება</label></td>
	               </tr>	              
	               <tr>
	                   <td><select id="task_status_id" style="width: 240px;" disabled>' . getStatusTask($res[task_status_id]) . '</select></td>
	                   <td style="width: 280px;"><input ' . $disa . ' type="checkbox" id="task_send" value="0" ' . ($res[task_date] == '' ? '' : 'checked') . '/></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" disabled>' . $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>
	                    <div style="margin-top:30px;">
	                <table class="display" id="table_question">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 50%;">კითხვა</th>
                            <th style="width: 50%;">პასუხი</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_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="box">
                
            </fieldset>
                    <fieldset style="display:none;height: 600px;" id="scenar">
                        
	       </fieldset>
	    </div>
	</div><input type="hidden" value="' . $res[id] . '" id="hidden_id">';
    return $data;
}
Example #3
0
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;
}