예제 #1
0
<?php

include_once 'function.php';
is_admin();
if (isset($_POST['submit'])) {
    addproduct();
    //echo "dsf";
}
$allproduct = getproduct();
$x = getcategory();
?>
<html>
<head>
<link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/style1.css">
  	<!-- TinyMCE -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/setup.js" type="text/javascript"></script/>
    <script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
	
            setupTinyMCE();

        });
		
    </script>
	
    <!-- /TinyMCE -->
  <script>
    $(function(){
예제 #2
0
<?php

// initialize
include_once '../../../common/init.php';
if (!isLoggedInAdmin()) {
    redirect('');
} else {
    // include needed database functions
    include_once $BASE_PATH . 'database/brands.php';
    include_once $BASE_PATH . 'database/products.php';
    // fetch data
    $brands = getAllBrands();
    $product = getproduct($_GET['id']);
    // send data to smarty
    $smarty->assign('brands', $brands);
    $smarty->assign('product', $product);
    // display smarty template
    $smarty->display('manager/products/form_edit_product.tpl');
}
예제 #3
0
        $name = $_GET['name'];
        $phone = $_GET['phone'];
        echo ' <div id="pages_maincontent">
           <h2 class="page_title">Add Leads</h2>
            <div class="cleaner_h10"></div>
            <p class="leadp">Counter check this information:</p>
             <div class="contactform">
            <form>
             <label>Product Details:</label>
             <input type="hidden" value="' . $cid . '" id="cid"/>
             <input type="hidden" value="' . $pid . '" id="pid"/>
             <input type="hidden" value="' . $categ . '" id="categid"/>
             <input type="hidden" value="' . $bid . '" id="bid"/>
             <input placeholder="Company Name" type="text" id="comname" value="' . getcompany($cid) . '" class="form_input required" disabled="disabled" />
             <input placeholder="Branch Name" type="text" id="branchname" value="' . getbranch($bid) . '" class="form_input required" disabled="disabled" />
             <input placeholder="Product Category" type="text" id="categname" value="' . getcateg($categ) . '" class="form_input required" disabled="disabled" />
             <input placeholder="Product Name" type="text" id="productname" value="' . getproduct($pid) . '" class="form_input required" disabled="disabled" />
            
            <label>Contact Details:</label>
            <input type="text"  id="ContactName" value="' . $name . '" class="form_input required name" placeholder="Name" />
            <input type="text"  id="ContactPhone" value="' . $phone . '" class="form_input required phone" placeholder="Phone" />
            <label>Additional Details:</label>
            <input type="text" name="ContactEmail" id="ContactEmail" value="" class="form_input required email" placeholder="Email" />
            <textarea name="ContactComment" id="ContactComment" class="form_textarea textarea required" rows="" cols="5" placeholder="Additional details/Comments"></textarea>
            <input type="button" name="submit" class="form_submit" id="submit" value="Add Lead" onclick="addlead()" />
            <label id="loader"></label>
            </form>
            </div>
             </div>';
        break;
}
예제 #4
0
function GetProductDialog($sale_detail_id)
{
    $my_req = mysql_fetch_array(mysql_query("SELECT production_id,quantity FROM `sale_details` WHERE id = {$sale_detail_id}"));
    if ($my_req[1] == '') {
        $quantity = 1;
        $disable = '';
        $show = 'style="display:none;"';
        $show1 = '';
    } else {
        $quantity = $my_req[1];
        $disable = 'disabled';
        $show1 = 'style="display:none;"';
        $show = '';
    }
    $data = '
			<div id="dialog-form">';
    if ($my_req[1] == '') {
        $quantity = 1;
        $disable = '';
        $show = 'style="display:none;"';
        $show1 = '';
        $data .= '<fieldset ' . $show1 . '>
					<legend>პროდუქტი</legend>
                    <div id="dt_example" class="inner-table" style="overflow: auto;">
			        <div style="width:100%;" id="container" >        	
		            <div id="dynamic">
	            	<div id="button_area">
        			</div>
					<table class="" id="sub3" style="width: 100%;">
	                    <thead>
							<tr  id="datatable_header">
								<th style="width:4%;">#</th>
								<th style="width:100px;">პროდუქტი</th>
		                        <th style="width:30px;">რ-ბა</th>
								<th style="width:30px;">ერთ. ფასი</th>
		                        <th style="width:30px;">სულ ფასი</th>
								<th style="width:100%">აღწერილობა</th>
								<th style="width:100%">შენიშვნა</th>
								<th style="width:5%;">#</th>
							</tr>
						</thead>
						<thead>
							<tr class="search_header">
								<th>
									<input style="width:20px;" type="text" name="search_overhead" id="clickme1" value="" class="search_init" />
								</th>
								<th>
									<input style="width:100px;" type="text" name="search_overhead" id="clickme2" value="" class="search_init" />
								</th>
								<th>
									<input style="width:20px;" type="text" name="search_partner" id="clickme3" value="" class="search_init" />
								</th>
								<th>
									<input style="width:20px;" type="text" name="search_overhead" id="clickme4"value="" class="search_init" />
								</th>
								<th>
									<input style="width:20px;" type="text" name="search_partner" id="clickme5" value="" class="search_init" />
								</th>
		                        <th>
									<input style="width:100px;" type="text" name="search_partner" id="clickme6" value="" class="search_init" />
								</th>
		                        <th>
									<input style="width:100px;" type="text" name="search_partner" id="clickme7" value="" class="search_init" />
								</th>
								<th>
									<input type="checkbox" name="check-all" id="check-all_p">
								</th>
							</tr>
						</thead>
	                </table>
	                   </div>
		            <div class="spacer">
		            </div>
		        </div>
		        </fieldset>
		 	        <input type="hidden" value="' . $sale_detail_id . '" id="sale_detail_id">
		    </div> <script>$(document).ready(function () {$(".add_product_chosse-class").css("top","0");});</script>';
    } else {
        $quantity = $my_req[1];
        $disable = 'disabled';
        $show1 = 'style="display:none;"';
        $show = '';
        $data .= '<fieldset ' . $show . '>
					<legend>პროდუქტი</legend>
					<table>
						<tr>
							  <td style="width:120px; padding-top: 5px;">დასახელება</td>
                              <td>
            						<select id="production_name" class="idle" ' . $disable . '>' . getproduct($my_req[0]) . '</select>
    				          </td>
				    	</tr>
						<tr>
							<td style="padding-top: 25px;">რაოდენობა</td>
							<td style="padding-top: 20px;"><input onclick="$(this).keydown(false);" type="number" style="margin-bottom: 10px; width: 40px;" id="porod_count" class="idle"  onblur="this.className=\'idle\'" value="' . $quantity . '" min="1"/></td>
						</tr>						
					</table>
		        </fieldset>
            	<input type="hidden" value="' . $sale_detail_id . '" id="sale_detail_id">
		    </div> <script>$(document).ready(function () {$(".add_product_chosse-class").css("top","0");});</script>';
    }
    return $data;
}