Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/templates/modules_settings.tpl
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="css/yui-fonts-min.css" />
<link rel="stylesheet" type="text/css" href="css/yui-tabview.css" />

<link href="css/global.css" rel="stylesheet" type="text/css" />


<link href="../menu/css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" />
<link href="../menu/css/dropdown/themes/default/default.advanced.css" media="all" rel="stylesheet" type="text/css" />



<!--[if lt IE 7]>
<script type="text/javascript" src="../menu/js/jquery/jquery.js"></script>
<script type="text/javascript" src="../menu/js/jquery/jquery.dropdown.js"></script>
<![endif]-->


<!-- Initialize Dojo -->
        {literal}
        <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/element/element-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/tabview/tabview-min.js"></script>

        <script src='../dojo/dojo/dojo.js' type='text/javascript'></script>
        
        <script type='text/javascript'>
        //<!--

        // The following function submits the data from the 'post-form' form
        // to a PHP script located at
        // 'http://www.dojoforum.com/demo-0.9/xhr/parse_form.php'
        // The PHP script simply outputs a string in the format of
        // 'Hello $name!', which is then put in the <div> w/ the id
        // of 'response'.
        //
        // NOTE: As with xhrGet, you can also use handleAs to accept
        // JSON objects in your load() function.
		//dojo.require("dojo.style");

	
		function updateModuleStatus(module_id, action){
			dojo.xhrPost ({
							// The page that parses the POST request
							url: 'modules_settings.php?mode='+action+'&module_id='+module_id,
				   
							// Name of the Form we want to submit
							//form: 'login',
					
							// Loads this function if everything went ok
							load: function (data) {
									// Put the data into the appropriate <div>
									//document.getElementById('loader2').style.display="";
									dojo.byId('module_list').innerHTML = data;
									//document.getElementById('loader2').style.display="none";
									
									
							},
							// Call this function if an error happened
							error: function (error) {
									console.error ('Error: ', error);
							}
				});
			
		}
		
		function saveModuleSettings(module_id, action){
		/**/
		
		module_name = document.getElementById('module_name_'+module_id).value;
		module_description = document.getElementById('module_description_'+module_id).value;
		
			dojo.xhrPost ({
							// The page that parses the POST request
							url: 'modules_settings.php?mode='+action+'&module_id='+module_id+'&module_name='+module_name+'&module_description='+module_description,
				   
							// Name of the Form we want to submit
							//form: 'login',
					
							// Loads this function if everything went ok
							load: function (data) {
									// Put the data into the appropriate <div>
									//document.getElementById('loader2').style.display="";
									dojo.byId('module_list').innerHTML = data;
									//document.getElementById('loader2').style.display="none";
									
									
							},
							// Call this function if an error happened
							error: function (error) {
									console.error ('Error: ', error);
							}
				});
		
			
		}
		
		function deleteModuleSettings(module_id){
		if(confirm("Are you sure you want to delete this module?")){
			dojo.xhrPost ({
									// The page that parses the POST request
									url: 'modules_settings.php?mode=delete&shipping_id='+shipping_id,
						   
									// Name of the Form we want to submit
									//form: 'login',
							
									// Loads this function if everything went ok
									load: function (data) {
											// Put the data into the appropriate <div>
											//document.getElementById('loader2').style.display="";
											dojo.byId('module_list').innerHTML = data;
											//document.getElementById('loader2').style.display="none";
											
											
									},
									// Call this function if an error happened
									error: function (error) {
											console.error ('Error: ', error);
									}
						});
				
		}
		}
		
		function addShippingSettings(){
		
		
		shipping_name = document.getElementById('shipping_name').value;
		shipping_description = document.getElementById('shipping_description').value;
		email_text = document.getElementById('email_text').value;
		module_id = document.getElementById('module_id').value;
		
		if(module_id=="" || email_text=="" | shipping_description=="" || shipping_name){
		alert("Please fill all columns to add new shipping method");
		}else{
			dojo.xhrPost ({
								// The page that parses the POST request
								url: 'modules_settings.php?mode=add&shipping_name='+shipping_name+'&shipping_description='+shipping_description+'&email_text='+email_text+'&module_id='+module_id,
					   
								// Name of the Form we want to submit
								//form: 'login',
						
								// Loads this function if everything went ok
								load: function (data) {
										// Put the data into the appropriate <div>
										//document.getElementById('loader2').style.display="";
										dojo.byId('shipping_list').innerHTML = data;
										//document.getElementById('loader2').style.display="none";
										
										
								},
								// Call this function if an error happened
								error: function (error) {
										console.error ('Error: ', error);
								}
					});
				
			}
		}
        //-->
        </script>
        {/literal}
</head>
<body>

<div id="page_container">
	<div id="admin_header">{include file='admin_header.tpl'}</div>
	<div id="admin_nav">{include file='admin_navigation.tpl'}</div>
    <div id="contents">
    	<!-- Manage category controls -->
        <div id="manage_cat_box">
        {include file='mini_ps_nav.tpl'}
             <h3>Modules</h3>
          <div style="width:690px;">
            <div style="width:100%; float:left;"><div id="module_list">{include file='modules_settings_form.tpl'}</div></div>
            <div style="width:100%; float:left;"></div>
          </div>
		</div>
        <!-- end manage categories -->
        <!-- <div id="section_info_box">
        <h4>PayPal</h4>
        <p></p>
        <h4>Bank Deposit</h4>
        <p></p>
        <h4>Money Order</h4>
        <p></p>
        </div>
        -->
    <div style="clear:both;"></div>   
    </div>
    
    <div id="admin_footer">{include file='admin_footer.tpl'}</div>
</div>

</body>
</html>
Return current item: Simple PHP Shopping cart - asaancart