Exemple #1
0
function GetPage($res = '', $number)
{
    $data .= '
	<div id="dialog-form">
			<div style="float: left; width: 580px;">	
				<fieldset >
			    	<legend>ინფო</legend>
					<fieldset float:left;">
				    	<table width="100%" class="dialog-form-table">
							<tr>
								<td>დასახელება</td>
								<td style="width:20px;></td>
								
								<td colspan "5">
									<input  type="text" id="action_name" class="idle" onblur="this.className=\'idle\'"  value="' . $res['action_name'] . '"  />
								</td>
							</tr>
							<tr>
								<td style="width: 150px;"><label for="d_number">პერიოდი</label></td>
								<td>
									<input type="text" id="start_date" class="idle" onblur="this.className=\'idle\'" value="' . $res['start_date'] . '" />
								</td>
								<td style="width: 150px;"><label for="d_number">-დან</label></td>
								<td>
									<input type="text" id="end_date" class="idle" onblur="this.className=\'idle\'"  value="' . $res['end_date'] . '"  />
								</td>
								<td style="width: 150px;"><label for="d_number">-მდე</label></td>
							</tr>
						</table>
									
					</fieldset>
					<fieldset style="float: left; width: 536px;">
						<legend>აღწერა</legend>
				    		<table width="100%" class="dialog-form-table">
							<tr>
								<td colspan="5">
									<textarea  style="width: 530px; height: 500px; resize: none;" id="action_content" class="idle" name="content" cols="100" rows="2">' . $res['action_content'] . '</textarea>
								</td>
							</tr>		
							</table>
					</fieldset>	
			</div>
			<div style="float: right;  width: 360px;">
				</fieldset>
										
				<fieldset style="width: 440px; float: right;">
						<legend>მიმაგრებული ფაილები</legend>				
				 
		 ' . show_file($res) . '
 				
	  			</fieldset>		
			</div>
				<input type="hidden" id="actionn_id" value="' . $res['id'] . '"/>
				<input type="hidden" id="act_id" value="' . ($res['id'] != '' ? $res['id'] : increment('action')) . '"/>
    </div>';
    return $data;
}
Exemple #2
0
<?php

include "../inc/chec.php";
include "../inc/func.php";
$filename = show_file();
for ($num = 2; $num < count($filename); $num++) {
    unlink("../bak/" . $filename[$num]);
}
echo "<script>alert('ɾ³ý³É¹¦£¡');location='data_stock.php'</script>";
            }
            // Debugging
            // echo "<br />" . $_GET["page"];
            break;
        case "2":
            $directory_traversal_error = directory_traversal_check_3($file);
            if (!$directory_traversal_error) {
                show_file($file);
            } else {
                echo $directory_traversal_error;
            }
            // Debugging
            // echo "<br />" . $_GET["page"];
            break;
        default:
            show_file($file);
            // Debugging
            // echo "<br />" . $_GET["page"];
            break;
    }
}
?>


</div>
    
<div id="side">    
    
    <a href="http://twitter.com/MME_IT" target="blank_" class="button"><img src="./images/twitter.png"></a>
    <a href="http://be.linkedin.com/in/malikmesellem" target="blank_" class="button"><img src="./images/linkedin.png"></a>
    <a href="http://www.facebook.com/pages/MME-IT-Audits-Security/104153019664877" target="blank_" class="button"><img src="./images/facebook.png"></a>
Exemple #4
0
            } elseif (POST('addfinalok') == 'Add File') {
                $tmp_path = POST("tmpname");
                $file_name = POST("fn");
                $file_extension = '.' . pathinfo($file_name, PATHINFO_EXTENSION);
                if (file_exists($tmp_path)) {
                    $category = explode(' - ', POST('category'))[0];
                    $subcategory = explode(' - ', POST('category'))[1];
                    $category_id = get_category_id($category);
                    $subcategory_id = get_subcategory_id($category_id, $subcategory);
                    $license_id = get_license_id(POST('license'));
                    $user_id = get_user_id(SESSION());
                    $file_id = insert_file($file_name, $user_id, $category_id, $subcategory_id, $license_id, POST('description'), POST('fsize'), sha1_file($tmp_path));
                    if ($file_id > 0) {
                        //echo "<code>rename " . $tmp_path . " to " . $DATA_DIR . $file_id . '</code>';
                        rename($tmp_path, $DATA_DIR . $file_id);
                        show_file($file_id, SESSION(), "File added successfully");
                    } else {
                        display_error("Failed to commit file <strong>{$file_extension}</strong>", array('<a href="">Add File</a>', 'Error'), $LSP_URL . '?content=add');
                    }
                } else {
                    display_error("Sorry, the uploaded file is no longer available.", array('<a href="">Add File</a>', 'Error'), $LSP_URL . '?content=add');
                }
            } else {
                display_error("Something went wrong");
            }
        }
    }
} else {
    display_error("You need to be logged in!", array('<a href="">Add File</a>', 'Error'), $LSP_URL . '?action=register');
}
?>
Exemple #5
0
    } else {
        display_warning('This will delete all comments and ratings.', array('Delete', get_file_url()));
        echo '<div class="col-md-9">';
        $form = new form(null, 'Confirm Delete', 'fa-trash');
        ?>
		<p class="lead">Confirm deletion of <strong><?php 
        echo get_file_name(GET('file'));
        ?>
</strong>?</p>
		<div class="form-group">
		<a class="btn btn-danger" href="<?php 
        echo "{$LSP_URL}?content=delete&confirmation=true&file=" . GET('file');
        ?>
">
		<span class="fa fa-check"></span>&nbsp;Delete</a>
		<a class="btn btn-warning" href="<?php 
        echo "{$LSP_URL}?action=show&file=" . GET('file');
        ?>
">
		<span class="fa fa-close"></span>&nbsp;Cancel</a>
		</form>
		<?php 
        $form->close();
        echo '</div>';
    }
} else {
    show_file(GET('file'), SESSION(), false);
}
?>

Exemple #6
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;
}
Exemple #7
0
function process_params()
{
    $post_funcs = explode(',', POST_FUNCS);
    foreach ($post_funcs as $func) {
        if (!GET_EMPTY($func)) {
            // Process parametrized functions
            switch ($func) {
                case 'rate':
                    update_rating(GET('file'), GET('rate'), SESSION());
                    break;
                    // break for file/rate, return for all others
                // break for file/rate, return for all others
                case 'search':
                    //move down
                //move down
                case 'q':
                    get_results(GET('category'), GET('subcategory'), GET('sort'), GET('q', GET('search', '')), '', GET('order'), GET('commentsearch'));
                    return;
                    // default: // do nothing
            }
            // Process built-in functions
            switch ($func . ":" . GET($func)) {
                case 'comment:add':
                    require "./comment_file.php";
                    return;
                case 'content:add':
                    require "./add_file.php";
                    return;
                case 'content:update':
                    require "./edit_file.php";
                    return;
                case 'content:delete':
                    require "./delete_file.php";
                    return;
                case 'account:settings':
                    require "./user_settings.php";
                    return;
                case 'action:show':
                    show_file(GET("file"), SESSION());
                    return;
                case 'action:register':
                    require "./register.php";
                    return;
                case 'action:browse':
                    // Browsing by category seems is currently only supported "browse" option
                    if (!GET_EMPTY('category')) {
                        get_results(GET('category'), GET('subcategory'), GET('sort'), '', '', GET('order'));
                        return;
                    } else {
                        if (!GET_EMPTY('user')) {
                            get_results(GET('category'), GET('subcategory'), GET('sort'), '', GET('user'), GET('order'));
                            return;
                        }
                    }
                    // default: // do nothing
            }
        }
    }
    // All else fails, show the "Latest Uploads" page
    get_latest();
}
Exemple #8
0
        }
    }
    $d->close();
    if (count($folders) > 0 || count($files) > 0) {
        //now sort the folders and files by name.
        ksort($files);
        ksort($folders);
        draw_table_header();
        for ($i = 0; $i < count($folders); $i++) {
            $folder_name = key($folders);
            show_dir($folders[$folder_name], $folder_name);
            next($folders);
        }
        for ($i = 0; $i < count($files); $i++) {
            $file_name = key($files);
            show_file($files[$file_name]);
            if (($i + 1) % 4 == 0) {
                newRow();
            }
            next($files);
        }
        draw_table_footer();
    } else {
        draw_no_results();
    }
} else {
    draw_no_dir();
}
?>
<script language="JavaScript" type="text/JavaScript">
MM_showHideLayers('loading','','hide')
Exemple #9
0
/**
 * update_dolphin is a system function for Dolphin.php . You need to specify the function to print errors, if they happen. update_dolphin requires $_REQUEST['act'] to be set to 'upload-new' or 'download-new', and returns NEED_UPLOAD if it needs to show the upload form (it happens if it cannot download the archive from site). The upload form must contain an input field with name "files[]". If all is ok, returns TRUE, otherwise returns string, containing error description or special NEED_UPLOAD. You need to check for TRUE using === operator.
 *
 * @param string $print_err_func
 * @return mixed
 */
function update_dolphin($print_err_func)
{
	if(IS_DEVELOPER) return 'This operation is not permitted for you';
	
	ini_set('display_errors', 'On');
		
	/* disable attempts to download the archive with Dolphin.php by itself */
	if(!CAN_SELFUPDATE) $_REQUEST['act'] = 'upload-new';

	$tmp  =get_tmp_dir();
	if(!$tmp) return 'No suitable temp directory found';
	$tmp = abs_path($tmp);
	$root = abs_path(ROOT);
			
	if(!$tmp || $tmp == $root || substr($tmp, 0, strlen($root)) == $root)
	{
		/* TODO: write normal answer if $tmp is ROOT or subdirectory of ROOT */
		return 'Update is impossible. '.reason();
	}
	
	chdir($tmp);
	
	if(empty($_FILES['files']) && $_REQUEST['act']!='download-new')
	{
		return NEED_UPLOAD;
	}
	
	if($_REQUEST['act']!='download-new') upload_files($tmp);
	else
	{
		$build = file_get_contents(MASTER_SITE.'files/dolphin-build.txt');
		
		$errtext = 'It seems that your server does not allow outgoing connections for PHP scripts, or '.MASTER_SITE.' is down. Try to upload archive with '.SNAME.' manually.';
		
		if(!$build) return NEED_UPLOAD;
		
		if(BUILD >= $build) return 'Your build is up-to-date';
		
		$dolphin = file_get_contents(MASTER_SITE.'files/dolphin-current.zip');
		
		if(!$dolphin) return NEED_UPLOAD;
		
		if(!d_file_put_contents($tmp.'/dolphin-current.zip', $dolphin)) return 'Cannot write '.show_file($tmp.'/dolphin-current.zip','file').' ('.$tmp.'/dolphin-current.zip).'.reason();
	}
	
	$f = $tmp.'/dolphin-current.zip';
	if(!file_exists($f)) return '<b>dolphin-current.zip</b> was not found';
	d_copy(ROOT.'/config.php',$cfg_old=$tmp.'/dolphin_config.php');
	
	require_once(ROOT.'/system/libs/pclzip.php');

	umask(0);
	/* note, that we check if extracting is possible _before_ deleting ROOT */
	$e=new PclZip($f);
	
	//echo '<!--';
	//echo 'file: '.$f.'<br>';
	
	// some hosters require PHP files and folders with PHP scripts to have special rights, so we need to
	// save rights for some essensial files
	
	$tochmod = array('','system','index.php','system/download.php','system/preview.php');
	$rights = array();
	foreach($tochmod as $v) $rights[ROOT.'/'.$v] = get_rights(ROOT.'/'.$v);
	
	d_remove(ROOT);
	//echo 'Removed ROOT.<br>';
	d_mkdir(ROOT,777);
	setwritable(ROOT);
	//echo 'Created ROOT.<br>';
	//echo 'ROOT is writable: '.(is_writable(ROOT) ? 'true' : 'false').'<br>';
	chdir(ROOT);
	//echo 'Changed directory to ROOT.<br>';
	//echo '-->';
	
	if(!$e->extract('.')) return '<b>dolphin-current.zip</b> could not be extracted. Upload the new version <b>via FTP</b>. Here are the contents of your <b>config.php</b>:<pre>'.htmlspecialchars(d_file_get_contents($cfg_old)).'</pre>';
	
	foreach($rights as $k=>$v) d_chmod($k,$v);
	
	if(!empty($_POST['save-login']) || $_REQUEST['act']=='download-new')
	{	
		/* delete BUILD, VERSION and NAME from config.php, they are now in core.php for compatibilty */
		$conf = d_file_get_contents($cfg_old);
		$conf = preg_replace('/define\\(\'(BUILD|VERSION|NAME)\'.*\\)\\;/sU','',$conf);
		d_file_put_contents(ROOT.'/config.php', $conf);
		
		$core = d_file_get_contents(ROOT.'/system/core.php');
		if(!$core)
		{
			$build = "undefined";
		}else
		{
			preg_match("/define\\('BUILD'\\,([0-9]+)\\)/is", $core, $m);
			$build = $m[1];
		}
		
		//echo '<!--Writing new information about build: '.$build.' and '.$version.'<br>-->';
	}
	
	d_unlink($f);
	//echo '<!-- Deleting archive<br> -->';
	
	if($build!='undefined' && $build > BUILD)
	{
		d_unlink($cfg_old);
		return true;
	}
	
	return 'Update did not complete successfully. Please upload the new version <b>via FTP</b>. Here are the contents of your previous <b>config.php</b>:<pre>'.htmlspecialchars(d_file_get_contents($cfg_old)).'</pre>';
}
Exemple #10
0
<?php

/*
 * This file is part of ad-change-pass.
 * 
 * ad-change-pass is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ad-change-pass is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ad-change-pass.  If not, see <http://www.gnu.org/licenses/>.
 */
include 'config.php';
include 'functions.php';
include 'lang.php';
include 'header.php';
show_file('help');
include 'footer.php';
Exemple #11
0
$mp06610771 = prot('boinc_master', 'boinc_project', '0661 or 0771');
$mp06640775 = prot('boinc_master', 'boinc_project', '0664 or 0775');
$mm2555 = prot('boinc_master', 'boinc_master', '0555');
$mm6555 = prot('boinc_master', 'boinc_master', '0555+setuid+setgid');
$ua0555 = prot('(installing user)', 'admin', '0555');
$colors = array('ddddff', 'ccccff', 'bbbbff');
function show_dir($level, $name, $prot, $contents)
{
    global $colors;
    $color = $colors[$level];
    $x = "\n        <table bgcolor={$color} cellpadding=6 cellspacing=0 border=1 width=100%>\n        <tr>\n            <td valign=top><b>{$name}</b> <font size=-1>{$prot}</font></td><td valign=top>\n    ";
    for ($i = 0; $i < sizeof($contents); $i++) {
        if ($i) {
            $x .= '<br>';
        }
        $c = $contents[$i];
        $x .= $c;
    }
    $x .= "\n        </td></tr>\n        </table>\n    ";
    return $x;
}
function show_file($name, $prot)
{
    return "\n            {$name} <font size=-1>{$prot}</font><br>\n    ";
}
echo "\n\n<p>\nOur design uses two users and two groups,\nboth specially created for use by BOINC.\nThese users and groups are created by the installation process.\n<ul>\n<li>Group: <b>boinc_master</b>\n<li>Group: <b>boinc_project</b>\n<li>User: <b>boinc_master</b>\n<ul>\n<li>Primary group: <b>boinc_master</b>\n<li>Supplementary groups: none\n</ul>\n<li>User: <b>boinc_project</b>\n<ul>\n<li>Primary group: <b>boinc_project</b>\n<li>Supplementary groups: none\n</ul>\n</ul>\nOn Mac OS X, <b>boinc_project</b> and <b>boinc_master</b>\nare added to the Supplementary Groups Lists of those other users\nwho are members of group <b>admin</b>.\nThis gives admin users full access to all BOINC and project files.\n<p>\nThe following diagram shows user, group and permissions\nfor the BOINC file and directory tree:\n<p>\n";
echo show_dir(0, 'BOINC data', $mm0771, array(show_dir(1, 'projects', $mp0770, array(show_dir(2, 'setiathome.berkeley.edu', $mp0775, array(show_file('files created by BOINC Client', $mp06610771), show_file('files created by project apps', $pp06610771), show_file('running BOINC installer changes all files to', $mp06610771))))), show_dir(1, 'slots', $mp0770, array(show_dir(2, '0', $mp0775, array(show_file('files created by BOINC Client', $mp06610771), show_file('files created by project apps', $pp06610771), show_file('running BOINC installer changes all files to', $mp06610771))))), show_dir(1, 'switcher (directory)', $mm0550, array(show_file('switcher (executable)', $rm4050), show_file('setprojectgrp (executable)', $mp2500))), show_dir(1, 'locale', $mm0555, array(show_dir(2, 'de', $mm0555, array(show_file('BOINC Manager.mo', $mm0444), show_file('wxstd.mo', $mm0444))))), show_file('account_*.xml', $mm0660), show_file('acct_mgr_login.xml', $mm0660), show_file('client_state.xml', $mm0660), show_file('gui_rpc_auth.cfg', $mm0660), show_file('sched_reply*', $mm0660), show_file('sched_request*', $mm0660), show_file('ss_config.xml', $mm0664)));
echo "<br><br>";
echo show_dir(0, 'BOINC executables', $ua0555, array(show_file('BOINC Manager', $mm2555), show_file('BOINC Client', $mm6555), show_dir(1, 'screensaver (directory)', $ua0555, array(show_file('gfx_switcher (executable)', $rm4555)))));
echo "\n\n<p>Implementation notes:\n\n<ul>\n<li>BOINC Client runs setuid and setgid to <b>boinc_master:boinc_master</b>.  \n<li>BOINC Client uses the helper application <i>setprojectgrp</i> to \nset project and slot files and directories to group <b>boinc_project</b>.  \n<li>BOINC Client does not directly execute project applications.\nIt runs the helper application <i>switcher</i>, \npassing the request in the argument list.\n<i>switcher</i> runs setuid <b>root</b> and immediately changes its real and \neffective user ID and group ID to <b>boinc_project</b>,\nso all project applications inherit user and group <b>boinc_project</b>.  \nThis blocks project applications from accessing unauthorized files.\n<li>In most cases, it is best to avoid running setuid <b>root</b> because \nit can present a security risk.  In this case, however, this is necessary to \n<i>reduce</i> the risk because only the superuser can change the <i>real</i> \nuser and group of a process.  This prevents a malicious or malfunctioning \napplication from reverting to the user and group who launched BOINC, since any \nprocess can change its user and group back to the <i>real</i> user and \ngroup IDs.\n<li>BOINC's use of setuid <b>root</b> for the <i>switcher</i> application is \nsafe because:\n<ul>\n<li>The <i>switcher</i> application is inside the <i>switcher</i> directory.\nThis directory is accessible only by user and group <b>boinc_master</b>,\nso that project applications cannot modify the <i>switcher</i> \napplication's permissions or code.  This also prevents unauthorized users \nfrom using <i>switcher</i> to damage or manipulate project files.\n<li>The <i>switcher</i> application is readable and executable only by \ngroup <b>boinc_master</b>; all other access is forbidden.\n<li>When it is run, the <i>switcher</i> application immediately changes \nits real and effective user ID and group ID to <b>boinc_project</b>, disabling \nits superuser privileges.\n</ul>\n<li>As of BOINC Version 6.10.5, BOINC Manager no longer runs setgid to group \n<b>boinc_master</b>, because Mac OS 10.6 does not allow it.  So it can be run \nonly by users who are members of group <b>boinc_master</b>. By default, the \nBOINC installer automatically adds all users who are members of group \n<b>admin</b> to group <b>boinc_master</b>, and optionally adds non-admin \nusers to group <b>boinc_master</b>.  The Manager runs as the user who \nlaunched it, which is necessary for a number of GUI features to work correctly.  \nAlthough this means that BOINC Manager cannot modify files created by project \napplications, there is no need for it to do so.  \n<li>Starting with BOINC version 6.0, project science applications use a \nseparate companion application to display graphics.  These graphics \napplications are launched by the BOINC Manager when the user clicks on \nthe <i>Show Graphics</i> button.  Running the graphics application \nwith the BOINC Manager's user and group would be a security risk, so \nBOINC Manager uses the <i>switcher</i> application to launch them as \nuser and group <b>boinc_project</b>. \n<li>The screensaver also can run the graphics applications.  The Macintosh \nscreensaver is launched by the operating system, so it runs as the \ncurrently logged in user and group.  Since running the science projects' graphics applications \nwith this user and group would be a security risk, the screensaver has \nits own embedded helper application <i>gfx_switcher</i> which it uses to \nlaunch and kill the graphics applications.  \nLike the <i>switcher</i> application, <i>gfx_switcher</i> runs setuid \n<b>root</b> and immediately changes its real and effective user ID and \ngroup ID to <b>boinc_project</b>.\n<li>Starting with BOINC version 6.7, a default screenaver graphics application \nis provided with BOINC.  The screensaver (now more properly called the \n<b>screensaver coordinator</b>) runs the default graphics alternating with science \ngraphics applications according to a schedule set by the data file ss_config.xml.  \nThe default graphics are run also when no science graphics are available, such as \nwhen BOINC is suspended.  The default graphics executable is run as user and group \n<b>boinc_project</b>.  \n<li>The BOINC screensaver's use of setuid <b>root</b> for the \n<i>gfx_switcher</i> application is safe because:\n<ul>\n<li>When it is run, the <i>gfx_switcher</i> application immediately changes \nits real and effective user ID and group ID to <b>boinc_project</b>, disabling \nits superuser privileges.\n<li>The <i>gfx_switcher</i> application has very limited functionality.  It \naccepts only three commands as its first argument: \n<ul>\n<li><i>launch_gfx</i>: the second argument is the slot number.  It looks for \na soft-link named <b>graphics_app</b> in the specified slot directory and launches \nthe referenced graphics application as user and group <b>boinc_project</b>.\n<li><i>default_gfx</i>: launches the default graphics application <i>boincscr</i> \nin the BOINC data directory as user and group <b>boinc_project</b>.\n<li><i>kill_gfx</i>: the second argument is the process ID.  It kills the \napplication with the process ID; since it is running as user and group \n<b>boinc_project</b>, it can affect only processes belonging to that user.  \nThis is used to exit all screensaver graphics applications.</ul>\n</ul>\n<li>To hide account keys from unauthorized users, BOINC Client sets its umask \nto 006 and (as of versions 6.8.20 and 6.10.30) makes all *.xml files at the top level \ndirectory not world-readable (except ss_config.xml, which must be read by the \nscreensaver coordinator).  This means that third-party add-ons cannot read BOINC \ndata files; they must use GUI RPCs to access BOINC Data.  \n<li>BOINC sets the umask for project applications to 002; the default permissions \nfor all files and directories they create prevent modification outside the \n<b>boinc_project</b> user and group.  \n<li>Files written by projects are world-readable so that the BOINC Client can read \nthem.  But, starting with BOINC versions 6.8.20 and 6.10.30, the slots directory and the projects \ndirectory are executable (traversable) only by user boinc_master and group \nboinc_projects, to prevent unauthorized users from reading account keys from the \ninit_data.xml files. \n<li>Unauthorized users cannot modify BOINC or project files.\n<li>Users with admin access are members of groups <b>boinc_master</b>\nand <b>boinc_project</b> so that they do have \ndirect access to all BOINC and project files\nto simplify maintenance and administration.\n<li>The RPC password file <i>gui_rpc_auth.cfg</i>\nis accessible only by user and group <b>boinc_master</b>.\nIn other words, only BOINC Manager, BOINC Client and authorized \nusers can read or modify it, restricting access to those BOINC RPC functions \nwhich modify BOINC's operation.  \n<li>On Macintosh computers, the actual directory structures\nof the BOINC Manager application bundle and the screensaver bundle are \nmore complex than implied by the box <i>BOINC executables</i> in the \nBOINC tree diagram shown above.\n<li>Some Macintosh system administrators may wish to further limit which users\ncan perform BOINC Manager functions (Activity Menu, etc.).\nThis can be done by moving BOINC Manager out of the\n<b>/Applications</b> directory into a directory with restricted access.\n<li><b>Important information for project developers:</b> The BOINC \ninstaller traverses the BOINC Data directory and sets the users, groups and \npermissions of all files as shown in the above table.  This allows it to \nrepair corrupted permissions.  <b>Note</b> that the BOINC installer will \n<b>change all files and subdirectories</b> in the projects directory, the slots directory, and \nall their subdirectories to <b>user boinc_master</b> and \n<b>group boinc_project</b>.  This means that:\n<ul>\n<li>If a project file needs to be \nexecutable by another project file, its executable-by-group permission bit \n<b>must</b> be set.  The BOINC installer will <i>not</i> alter the \nexecutable-by-user and executable-by-group permission bits of files in these \ndirectories (though it will set these bits for the directories themselves.)\n<li>It is <b>critical</b> that all files and subdirectories under the projects \nand slots directories have both their read-by-owner <b>and</b> read-by-group \npermission bits set, and that all subdirectories have both their \nexecutable-by-owner and executable-by-group permission bits set.\n</ul>\n</ul>\n</p>\n";
page_tail();
Exemple #12
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;
}
Exemple #13
0
        ?>
</textarea>
		</div>
		<button class="btn btn-primary" type="submit" name="updateok" value="OK"><span class="fa fa-check"></span>&nbsp;Update File</button>
		<a href="<?php 
        echo "{$LSP_URL}?action=show&file=" . GET('file');
        ?>
" class="btn btn-warning"><span class="fa fa-close"></span>&nbsp;Cancel</a>
		<input type="hidden" name="fn" value="'.$file_name.'" />
		<input type="hidden" name="action" value="update" />
		<?php 
        $form->close();
        echo '</div>';
    } else {
        $category = explode(' - ', POST('category'))[0];
        $subcategory = explode(' - ', POST('category'))[1];
        $category_id = get_category_id($category);
        $subcategory_id = get_subcategory_id($category_id, $subcategory);
        $license_id = get_license_id(POST('license'));
        $success = false;
        if (update_file(GET('file'), $category_id, $subcategory_id, $license_id, POST('description'))) {
            $success = true;
        }
        show_file(GET('file'), SESSION(), $success);
    }
} else {
    display_error('Sorry, you cannot edit this file.', array('Edit', get_file_url()));
}
?>

	</table>
<?php 
}
###############################################################################
# copy file
###############################################################################
if ($filecopy == 1) {
    $strOutput .= "<table border=1><tr><td colspan=2><h3>copy file</h3></td></tr>\n\t<form method='post' target='_parent' action=" . $MyLoc . "?" . $SREQ . "&'>\n\t<tr><td>source</td><td><input type=text name='filecopy_source' value='" . $filecopy_source . "'></td></tr>\n\t<tr><td>destination</td><td><input type=text name='filecopy_dest'  value='" . $filecopy_dest . "'></td></tr>\n\t<tr><td></td><td><input type=submit></td></tr>\n\t<tr><td colspan=2>" . copy_file($filecopy_source, $filecopy_dest) . "</td></tr>\n\t</form>\n\t</table>";
}
###############################################################################
# edit file
###############################################################################
if ($fileedit == 1) {
    $strOutput .= "<table border=1><tr><td colspan=2><h3>edit file</h3></td></tr>\n\t<form method='post' target='_parent' action='" . $MyLoc . "?" . $SREQ . "&'>\n\t<tr><td>file</td><td><input type=text name='editfile' value='" . $editfile . "'></td></tr>\n\t<tr><td>edit</td><td><input type='checkbox' name='edit' value='1'></td></tr>\n\t<tr><td>content</td><td><textarea name='editcontent' cols='50' rows='10'>";
    if ($edit == 1 | $editfile != $ArrDefaults['editfile']) {
        $strOutput .= show_file($editfile);
    }
    $strOutput .= "</textarea></td></tr>\n\t<tr><td></td><td><input type=submit></td></tr>\n\t<tr><td colspan=2>";
    if ($edit == 1 | $editfile != $ArrDefaults['editfile']) {
        $strOutput .= edit_file($editcontent, $editfile, $edit);
    }
    $strOutput .= "</td></tr>\n\t</table>\n\t</form>";
}
###############################################################################
# execute cmd shell NEEDS MODIFINY FOR B64 STATUS!!
###############################################################################
if ($cmdln == 1) {
    $emeth = test_cmd_shell();
    $strOutput .= "<table border=1><tr><td colspan=2><h3>execute cmd execution: " . $cmdcall . "</h3></td></tr>\n\t<form method='post' target='_parent' action='" . $MyLoc . "?" . $SREQ . "&'>\n\t<tr><td>cmd line</td><td><input type=text name='cmdcall' value='" . $cmdcall . "'></td></tr>\n\t<tr><td></td><td><input type=submit></td></tr>\n\t<tr><td>test method with 'pwd'</td><td>" . $Mstr[$emeth] . "</td></tr>\n\t<tr><td colspan=2>";
    if ($emeth < 3) {
        $strOutput .= "The output of this command will be somewhere on the page!";
Exemple #15
0
			
			light_message('Choose at least one file!');
		}
		break;
	case 'properties':
		if(empty($_REQUEST['files']))
		{
			$nomain=false;
			light_message('Choose at least one file to see properties!');
		}else if(sizeof($_REQUEST['files']) == 1)
		{
			$f = clean($_REQUEST['files'][0]);
			
			@$s = getimagesize($f);
			
			light_message('<h3>Properties for '.show_file($f).'</h3>
			<p>size: <b>'.show_size($f).'</b></p>
			<p>date: <b>'.date('d M Y',filemtime($f)).'</b></p>
			<p>mod: <b>'.get_rights($f, false).' ('.get_rights($f).')</b></p>
			'.(($owner=get_owner($f)) ? '<p>owner: <b>'.$owner.'</b></p>' : '').'
			'.(($group=get_group($f)) ? '<p>group: <b>'.$group.'</b></p>' : '').
			($s ? '<p>width: <b>'.$s[0].'px</b></p><p>height: <b>'.$s[1].'px</b></p>' : ''));
		}else
		{
			$files = $_REQUEST['files'];
			$groups = $owners = array();
			$fsizes = $dsizes = array();
			$mods = array();
			
			foreach($files as $k=>$v)
			{
Exemple #16
0
function GetPage($res, $increment)
{
    if ($res[id] == '') {
        $hid_id = increment(client);
        $hid_contract_id = increment(client_contract);
    } else {
        $hid_id = $res[id];
        $hid_contract_id = $res[id];
    }
    $image = $res['image'];
    if (empty($image)) {
        $image = '0.jpg';
    } else {
        $disable_img = 'disabled';
    }
    if ($res[invoice] == 1) {
        $inv_check = "checked";
    } else {
        $inv_check = "";
    }
    if ($res[report_invoice] == 1) {
        $report_check = "checked";
    } else {
        $report_check = "";
    }
    if ($res[taking_over_act] == 1) {
        $taking_check = "checked";
    } else {
        $taking_check = "";
    }
    $data .= '
	<div id="tabs1" style="width: auto; height: 557px;">
		<ul>
		<li><a href="#tab-0">მთავარი</a></li>
		<li><a href="#tab-1">პროექტი</a></li>
		</ul>
	<div id="tab-0">
	<div id="dialog-form">
	    <div style="width: 609px;  float: left;">
	    <fieldset>
	       <legend>ძირითადი ინფორმაცია</legend>
			<table>
			<tr>
			<td>
	       <table>
	    		<tr>
					<td id="img_colum">
						<img style="margin-left: 5px;" width="105" height="105" id="upload_img" src="media/uploads/file/' . $image . '" />
					</td>
				</tr>
				<tr>
					<td id="act">
						<span>
							<a href="#" onclick="view_image(' . $res[image_id] . ')" class="complate">View</a> | <a href="#" id="delete_image" image_id="' . $res[image_id] . '" class="delete">Delete</a>
						</span>
					</td>
				</tr>
				</tr>
					<td>
						<div style="margin-top:10px; width: 127px; margin-left: -5px;" class="file-uploader">
							<input id="choose_file" type="file" name="choose_file" class="input" style="display: none;">
							<button id="choose_button' . $disable_img . '" class="center" >აირჩიეთ ფაილი</button>
						</div>
					</td>
				</tr>
			</table>
			</td>
			<td>
	       <table class="dialog-form-table">
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1">საიდენტიფიკაციო კოდი</label></td>
	           </tr>
	           <tr>
	                <td>
						<input type="text" id="identity_code" style="width: 300px;" value="' . $res['identity_code'] . '"/>
					</td>
				    <td>
						<button style="float:right;" id="client_check" style="width: 60px;">შეამოწმე</button>
					</td>
				</tr>
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1_1">დასახელება</label></td>
	           </tr>
	           <tr>
	               <td colspan="2"><input id="client_name" style="resize: vertical;width: 415px;" value="' . $res['name'] . '"/></td>
	           </tr>
	           <tr>
	               <td colspan="2"><label for="incomming_cat_1_1_1">იურიდიული მისამართი</label></td>
    	       </tr>
	           <tr>
	               <td colspan="2"><input id="jurid_address" type="text" style="width: 415px;" value="' . $res['juridical_address'] . '"/></td>
    	       </tr>
	       		<tr>
	               <td colspan="2"><label for="incomming_comment">ფაქტიური მისამართი</label></td>
	           </tr>
	           <tr>
	               <td colspan="2"><input id="fact_address" style="resize: vertical;width: 415px;" value="' . $res['physical_address'] . '"/></td>
	           </tr>
	       </table>
			 </td> 
			</tr>
			
			</table>
	                   </fieldset>
	                   <fieldset>
	                   <legend>საკონტაქტო პირები</legend>
	    	<div class="" style="width:587px;">           
	            <div id="button_area">
                    <button id="add_client">დამატება</button>
					<button id="delete_client">წაშლა</button>
                </div>
				<table class="display" id="table_client" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 50%;">სახელი</th>
                            <th style="width: 50%;">გვარი</th>
                            <th style="width: 50%;">თანამდებობა</th>
                            <th style="width: 50%;">მობილური</th>
							<th style="width: 50%;">ელ ფოსტა</th>
							<th style="width: 25px;" class="check">&nbsp;</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>
							<th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
	               			<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-client" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-client"></label>
				                </div>
				            </th>
                        </tr>
                    </thead>
                </table>
	            </div>
	                  
         </fieldset>
	                   </div>
	    
	    
        <div id="side_menu" style="float: left;height: 495px;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="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>
	   
	    </div>
	    
	    <div style="width: 445px;float: left;margin-left: 10px;" id="right_side">
            <fieldset style="display:none;" id="info">
                <legend>კონტრაქტი</legend>
	            <span style="margin-right: 5px; margin-top: 50px;" class="hide_said_menu">x</span>
                <div id="pers">
	               	<table class="margin_top_10">
                            <tr>
                                <td style="width: 230px;"><label for="client_person_phone1">ხელშეკრულების ნომერი</label></td>
        	                    <td><label for="client_person_phone2">გაფორმების თარიღი</label></td>
                            </tr>
    	                    <tr>
                                <td><input style="margin-top: 10px;" id="contract_number" type="text" value="' . $res[number] . '"></td>
        	                    <td><input style="margin-top: 10px;" id="add_date" type="text" value="' . $res[create_date] . '"></td>
                            </tr>
    	                    <tr>
        	                    <td colspan="2"><label style="margin-left: 135px; margin-top: 20px;" for="client_person_mail2">მოქმედების პერიოდი</label></td>
                            </tr>
    	                    <tr>
                                <td><input style="margin-top: 10px;" id="contract_start_date" type="text" value="' . $res[validity_period_start] . '">
									
								</td>
        	                    <td><input style="margin-top: 10px;" id="contract_end_date" type="text" value="' . $res[validity_period_end] . '"></td>
                            </tr>
	                        <tr>
                                <td><label style="margin-top: 20px;" for="client_person_addres2">ხელშეკრულების ღირებულება</label></td>
        	                    <td><label style=" margin-top: 20px;" for="client_person_phone2">საანგარიშო პერიოდი</label></td>
                            </tr>
    	                    <tr>
									<td>
										<td>
											<input style="margin-top: 10px; width: 129px; margin-left: -231px;" id="contract_price" type="text" value="' . $res[price] . '">
										</td>
										<td>
											<label style="margin-left: -292px; margin-top: 16px;">-ლარი</label>
										</td>
									</td>
									<td>
										<td>
											<select style="margin-top: 10px; width: 50px; margin-left: -200px;"  id="angarish_period">' . Get_reporting_period_count($res[reporting_period_count]) . '</select>
										</td>
		        	                    <td>
											<select style="margin-top: 10px; width: 106px; margin-left: -133px;"  id="angarish_period1">' . Get_reporting_period_type($res[reporting_period_type]) . '</select>
										</td>
									</td>
							</tr>
							<tr>
								<td colspan="2">
									' . show_file($res) . '
								</td>
							</tr>				
                        </table>
				 </div>
				
			</fieldset>
    	    <fieldset style="display:none; width: 436px;" id="task">
                <legend>დოკუმენტი</legend>
	            <span style="margin-right: 5px; margin-top: 50px;" class="hide_said_menu">x</span>
	            <table>
	               <tr>
						<td><input type="checkbox" id="invois" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: -5px; width: 16px;" ' . $inv_check . '/></td>
	                    <td><label>ინვოისი</label></td>
	               </tr>
				   <tr>
						<td><input type="checkbox" id="migeba_chabareba" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: 14px; width: 16px;" ' . $taking_check . '/></td>
	                    <td><label style="margin-top: 20px;">მიღება-ჩაბარების აქტი</label></td>
	               </tr>
			       <tr>
						<td><input type="checkbox" id="angarishfaqtura" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="1" style="display: inline; margin-left: 20px; margin-top: 14px; width: 16px;" ' . $report_check . '/></td>
	                    <td><label style="margin-top: 20px;">ანგარიშ-ფაქტურა</label></td>
	               </tr>
	            </table>
            </fieldset>
        </div>
	</div>
	</div>
	<div id="tab-1">
	
	<div class="margin_top_10">           
	            <div id="button_area">
                    <button id="add_project">დამატება</button>
					<button id="delete_project">წაშლა</button>
                </div>
				<table class="display" id="table_project" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 50%;">დასახელება</th>
                            <th style="width: 50%;">ტიპი</th>
                            <th style="width: 50%;">შექმნის თარიღი</th>
                            <th style="width: 50%;">ნომრები</th>
							<th style="width: 25px;" class="check">&nbsp;</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                        	   <input type="text" name="search_id" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                            	<input type="text" name="search_number" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 100%;"/>
                            </th>
							<th>
				            	<div class="callapp_checkbox">
				                    <input type="checkbox" id="check-all-project" name="check-all" />
				                    <label style="margin-top: 3px;" for="check-all-project"></label>
				                </div>
				            </th>
                        </tr>
                    </thead>
                </table>
	        </div>
	</div>
	</div>
	
	<input type="hidden" value="' . $res[id] . '" id="hidden_id">
	<input type="hidden" value="' . $hid_id . '" id="hidden_client_id">
	<input type="hidden" value="' . $hid_contract_id . '" id="hidden_clientcontract_id">';
    return $data;
}
Exemple #17
0
    $relative_path = clean_path(filter_input(INPUT_GET, 'code', FILTER_SANITIZE_SPECIAL_CHARS));
    print file_get_contents("{$class_path}/{$relative_path}");
    die;
}
// Provide the contents of all code files in this folder, often an assignment, recursively.
if (isset($_GET['files'])) {
    $title .= " Showing All Code File Contents with Folder";
    $folder = clean_path(filter_input(INPUT_GET, 'files', FILTER_SANITIZE_SPECIAL_CHARS));
    $paths = bob_scandir("{$class_path}/{$folder}", $admin_path, true);
    if ($paths === False or count($paths) == 0) {
        $body[] = "<p class=\"error\">No files found.</p>";
    } else {
        foreach ($paths as $file_path) {
            $relative_path = substr($file_path, strlen($class_path));
            if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts)) {
                $body[] = show_file($relative_path, $class_path, $code_exts);
            } elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $image_exts)) {
                $body[] = "<h1>{$relative_path}</h1><p><img src=\"/{$class_folder}/{$relative_path}\" alt=\"{$relative_path}\"></p>";
            } elseif (strtolower(pathinfo($file_path, PATHINFO_EXTENSION)) == 'pdf') {
                $body[] = "<h1>{$relative_path}</h1><p><object type=\"application/pdf\" src=\"/{$class_folder}/{$relative_path}\">It appears that your browser does not support embedding pdf documents.</object></p>";
            } else {
                $body[] = "<p>Skipping {$relative_path}</p>";
            }
        }
    }
}
///////////////////////////////////////////////////////////////////////////////
// Support Functions //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Returns the root path of this class. This is to ensure that this class path serves as our root
// so that we can not show other file contents.
Exemple #18
0
    Webfinance is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Webfinance; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
require "../inc/main.php";
if (isset($_GET['action']) == 'file' and isset($_GET['id'])) {
    if (isset($_GET['type']) and $_GET['type'] != "") {
        show_file($_GET['id'], $_GET['type']);
    } else {
        show_file($_GET['id'], "transactions");
    }
}
function show_file($id_transaction, $type)
{
    $result = mysql_query("SELECT " . "file, " . "file_type as type, " . "file_name as name " . "FROM webfinance_{$type} " . "WHERE id=" . $id_transaction) or wf_mysqldie();
    if (mysql_num_rows($result) > 0) {
        $afile = mysql_fetch_assoc($result);
        mysql_free_result($result);
        $file_name = $afile['name'];
        $file_type = $afile['type'];
        $file = $afile['file'];
        header('Content-type: $file_type');
        header("Content-Disposition: attachment; filename={$file_name}");
        echo $file;
        //echo base64_decode($afile['file']);
Exemple #19
0
			<p>
				Dibawah ini adalah galery bagi pengguna yang telah berhasil dan memasang
				software MaxOn di perusahaan atau organisasi anda.
				Silahkan submit logo perusahaan atau website anda disini.
			</p>
<?	
  if ($handle = opendir('./images/clients/')) {
        while (false !== ($entry = readdir($handle))) {
            if ($entry != "." && $entry != "..") {
				if($pos=strpos($entry,".jpg.txt")){
					show_file($entry);
				}
            }
        }
        closedir($handle);
		show_file();
   }
   
   function show_file($filename="") {
		if($filename=="") {
			$id="id='add-me-box'";
			$file_jpg="addme.gif";
			$content="Silahkan upload gambar logo anda disini";
			$title="Add My Company";
		} else {
			// id='add-me-box'
			$id="";
			$pos=strpos($filename,".jpg.txt");
			$file_txt=$filename;
			$file_jpg=str_replace(".jpg.txt",".jpg",$file_txt);
			// read content
Exemple #20
0
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;
}
Exemple #21
0
<form name="bak" id="bak" method="post" action="bak_chk.php">
  <tr>
    <td align="right" class="STYLE3">数据备份:</td>
    <td><input type="text" name="b_name" value="<?php 
echo date("YmdHis");
?>
.sql" readonly="readonly" size="25" /></td>
    <td><input name="submit" type="submit" id="submit" value="备份数据" /></td>
  </tr>
</form>
<form name="rebak" id="rebak" method="post" action="rebak_chk.php">&nbsp;
  <tr>
    <td align="right" class="STYLE3">数据恢复:</td>
    <td><select name="r_name" style="width:190;">
		<?php 
$filename = show_file(PATH . ROOT . ADMIN . BAK);
for ($num = 2; $num < count($filename); $num++) {
    ?>
			<option value="<?php 
    echo $filename[$num];
    ?>
"><?php 
    echo $filename[$num];
    ?>
</option>
		<?php 
}
?>
		</select> </td>
    <td><input name="submit2" type="submit" id="butt" onclick="return re_bak();" value="恢复备份"/></td>
  </tr>
Exemple #22
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;
}