⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 zapatec suite 最新版 20070204,非常棒的ajax widgets 工具包
💻 PHP
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?/* $Id: index.php 4521 2006-09-21 13:07:11Z shacka $ */require_once("config.php");?><html><head>	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>utils/utils.js"></script>	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>utils/transport.js"></script>	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>utils/zpwidget.js"></script>	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>zptabs/src/zptabs.js"></script>	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>zptabs/src/zptabs-wizard.js"></script>	<script type="text/javascript" src="<?= ZP_BASE_DIR ?>zpform/src/form.js"></script>	<link href="website/css/zpcal.css" rel="stylesheet" type="text/css" />	<link href="website/css/template.css" rel="stylesheet" type="text/css" />	<link rel="SHORTCUT ICON" href="http://www.zapatec.com/website/main/favicon.ico" />	<title>Zapatec Tabs + Forms / Wizard Demo</title></head><body>	<table class="zpStandard"><tr><td>	<div class="topMenuHeader">		<div class="logo">			<a href="http://www.zapatec.com"><img src="website/images/logoNew.gif" alt="Zapatec logo" border="0"></a>		</div>		<div class="btn1">			<a href="https://www.zapatec.com/zadmin/buy.jsp">				<img src="website/images/buttonBuy.png" alt="Buy Zapatec Tabs" border="0" />			</a>		</div>		<div class="btn1">			<a href="http://www.zapatec.com/website/main/pricing.jsp">				<img src="website/images/buttonPricing.png" alt="Pricing for Zapatec Tabs" border="0" />			</a>		</div>	</div>	<div class="pageMain">				<div class="zpCalSubHeader" style="text-align:center">Zapatec Tabs + Forms / Wizard Demo</div>		<br/>	<div style="width: 600px">  <center><div id="tabBar"></div></center>  <div id="tabs" style="padding: 10px; min-height: 380px; height: auto !important; height: 380px">    <div id="productTab">      <label>Product Info</label>      <div style="margin-bottom: 10px">        <strong> In the Website field</strong><br />        For a Single Server license enter the full url of the server.<br />        For a Domain Wide license enter the domain name.<br />        For an Unlimted license enter the primary domain name.      </div>      <form id="productForm" name="productForm" class="zpForm" style="margin: 0px">        <div id="productTabError" style="display: none; padding: 5px; font: bold 14px arial, sans-serif; color: #f00"></div>        <table>          <tr>            <td><label class="zpFormLabel" id="pWebsiteLabel" for="pWebsite">Website</label></td>            <td><input class="zpFormRequired" size="40" maxlength="1024" id="pWebsite" name="pWebsite" type="text" /></td>          </tr>          <tr>            <td><label class="zpFormLabel" id="pNumberLicensesLabel" for="pNumberLicenses">Number of Licenses</label></td>            <td><input class="zpFormRequired zpFormInt" value="1" size="10" maxlength="11" id="pNumberLicenses" name="pNumberLicenses" type="text" /></td>          </tr>          <tr>            <td><label class="zpFormLabel" id="pLicenseTypeLabel" for="pLicenseType">License Type</label></td>            <td><select class="zpFormRequired" id="pLicenseType" name="pLicenseType">              <option value="Suite Single Server">Suite Single Server ($399) </option>              <option value="Suite Domain Wide">Suite Domain Wide ($2400) </option>              <option value="Suite Unlimited">Suite Unlimited ($3700) </option>              <option value="Suite Library">Suite Library ($4800) </option>            </select></td>          </tr>          <tr>            <td><label class="zpFormLabel" id="pCommentsLabel" for="pComments">Comments</label></td>            <td><textarea id="pComments" name="pComments" cols="40" rows="3"></textarea></td>          </tr>        </table>      </form>    </div>    <div id="userTab">      <label>User Info</label>      <form id="userForm" name="userForm" class="zpForm" style="margin: 0px">        <div id="userTabError" style="display: none; padding: 5px; font: bold 14px arial, sans-serif; color: #f00"></div>        <table>        <tr>          <td><label class="zpFormLabel" id="uFirstNameLabel" for="uFirstName">First Name</label></td>          <td><input class="zpFormRequired" size="40" maxlength="1024" id="uFirstName" name="uFirstName" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uLastNameLabel" for="uLastName">Last Name</label></td>          <td><input class="zpFormRequired" size="40" maxlength="1024" id="uLastName" name="uLastName" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uEmailLabel" for="uEmail">Email</label></td>          <td><input class="zpFormRequired zpFormEmail" size="40" maxlength="1024" id="uEmail" name="uEmail" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uAddress1Label" for="uAddress1">Address Line 1</label></td>          <td><input size="30" maxlength="1024" id="uAddress1" name="uAddress1" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uAddress2Label" for="uAddress2">Address Line 2</label></td>          <td><input size="30" maxlength="1024" id="uAddress2" name="uAddress2" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uCityLabel" for="uCity">City</label></td>          <td><input size="40" maxlength="1024" id="uCity" name="uCity" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uStateLabel" for="uState">State</label></td>          <td><input size="40" maxlength="1024" id="uState" name="uState" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uZipLabel" for="uZip">Zip</label></td>          <td><input size="20" maxlength="1024" id="uZip" name="uZip" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uCountryLabel" for="uCountry">Country</label></td>          <td><input size="40" maxlength="1024" id="uCountry" name="uCountry" type="text" /></td>        </tr>        <tr>          <td><label class="zpFormLabel" id="uPromoLabel" for="uPromo">Promo Code</label></td>          <td><input size="20" maxlength="1024" id="uPromo" name="uPromo" type="text" /></td>        </tr>        </table>      </form>    </div>    <div id="orderTab">      <label>Place Order</label>      <div id="orderLoading">        Please wait while loading...      </div>      <div id="orderContent" style="display: none">        <table>          <tr>            <td>Order number:</td>            <td id="tOrderNumber"></td>          </tr>          <tr>            <td>Item(s)</td>            <td id="tProduct"></td>          </tr>          <tr>            <td>Price Each</td>            <td id="tPriceEach"></td>          </tr>          <tr>            <td>Total</td>            <td id="tPriceTotal"></td>          </tr>          <tr>            <td>First Name</td>            <td id="tFirstName"></td>          </tr>          <tr>            <td>Last Name</td>            <td id="tLastName"></td>          </tr>          <tr>            <td>Email</td>            <td id="tEmail"></td>          </tr>          <tr>            <td>Address Line 1</td>            <td id="tAddress1"></td>          </tr>          <tr>            <td>Address Line 2</td>            <td id="tAddress2"></td>          </tr>          <tr>            <td>City</td>            <td id="tCity"></td>          </tr>          <tr>            <td>State</td>            <td id="tState"></td>          </tr>          <tr>            <td>Zip</td>            <td id="tZip"></td>          </tr>          <tr>            <td>Country</td>            <td id="tCountry"></td>          </tr>          <tr>            <td>Comments</td>            <td id="tComments"></td>          </tr>        </table>        <form method="post" action="https://www.paypal.com" name="_xclick" target="paypal" style="margin: 10px">           <input value="_xclick" name="cmd" type="hidden" />          <input value="me@mybusiness.com" name="business" type="hidden" />          <input value="1" name="no_shipping" type="hidden" />          <input value="1" name="no_note" type="hidden" />          <input value="0" name="cs" type="hidden" />          <INPUT TYPE="hidden" NAME="item_name" VALUE="" />          <INPUT TYPE="hidden" NAME="item_number" VALUE="" />          <INPUT TYPE="hidden" NAME="amount" VALUE="" />          <INPUT TYPE="hidden" NAME="currency_code" VALUE="USD" />          <INPUT TYPE="hidden" NAME="first_name" VALUE="" />          <INPUT TYPE="hidden" NAME="last_name" VALUE="" />          <INPUT TYPE="hidden" NAME="address1" VALUE="" />          <INPUT TYPE="hidden" NAME="address2" VALUE="" />          <INPUT TYPE="hidden" NAME="city" VALUE="" />          <INPUT TYPE="hidden" NAME="state" VALUE="" />          <INPUT TYPE="hidden" NAME="zip" VALUE="" />          <INPUT TYPE="hidden" NAME="country" VALUE="" />          <INPUT TYPE="hidden" NAME="email" VALUE="" />        </form>        <div>          Note: We use Paypal to process your order, but <strong>you do not need          to have a paypal account</strong> to purchase our products.          On the next screen you will have an option to          <strong>pay with a credit card</strong>.        </div>      </div>    </div>  </div></div><div style="padding: 10px; text-align: right"><button onclick="objWizard.prevTab()" accesskey="p" id="buttonPrev" style="display: none">&laquo; <u>P</u>rev.</button><button onclick="objWizard.nextTab()" accesskey="n" id="buttonNext"><u>N</u>ext &raquo;</button></div><script type="text/javascript">// Shortcutvar _el = function(strId) {  return document.getElementById(strId);};// Forms error messagefunction formErrorMessage(objArgs) {  var strMessage = objArgs.generalError + '<br />';  if (objArgs.fieldErrors) {    for (var iField = 0; iField < objArgs.fieldErrors.length; iField++) {      var strFieldName = objArgs.fieldErrors[iField].field.name;      var objLabel = _el(objArgs.fieldErrors[iField].field.name + 'Label');      if (objLabel) {        strFieldName = objLabel.innerHTML;      }      strMessage += strFieldName + ': ' +       objArgs.fieldErrors[iField].errorMessage + '<br />';    }  }  return strMessage;}// Error handlervar funcError = function(objArgs) {  var objErrorDiv = _el(objArgs.tabId + 'Error');  if (!objErrorDiv) {    return;  }  objErrorDiv.innerHTML = formErrorMessage(objArgs);  objErrorDiv.style.display = 'block';};// Valid handlervar funcValid = function(objArgs) {  var objErrorDiv = _el(objArgs.tabId + 'Error');  if (!objErrorDiv) {    return;  }  objErrorDiv.style.display = 'none';};// Success handler. Called after wizard is submitted and "success" response// received from the server.var funcSuccess = function(objArgs) {  // Populate PayPal form  var objPayPal = document.forms._xclick;  if (objArgs && objArgs.orderNumber) {    _el('tOrderNumber').innerHTML = objArgs.orderNumber;    objPayPal.item_number.value = objArgs.orderNumber;  }  var objProductInfo = document.forms.productForm;  _el('tProduct').innerHTML =   objProductInfo.pNumberLicenses.value + ' X ' +   objProductInfo.pLicenseType.value + ' for: ' +   objProductInfo.pWebsite.value;  objPayPal.item_name.value = objProductInfo.pLicenseType.value;  if (objArgs && objArgs.priceEach) {    _el('tPriceEach').innerHTML = '$' + objArgs.priceEach;  }  if (objArgs && objArgs.priceTotal) {    _el('tPriceTotal').innerHTML = '$' + objArgs.priceTotal;    objPayPal.amount.value = objArgs.priceTotal;  }  _el('tComments').innerHTML = objProductInfo.pComments.value;  var objUserInfo = document.forms.userForm;  _el('tFirstName').innerHTML = objUserInfo.uFirstName.value;  objPayPal.first_name.value = objUserInfo.uFirstName.value;  _el('tLastName').innerHTML = objUserInfo.uLastName.value;  objPayPal.last_name.value = objUserInfo.uLastName.value;  _el('tEmail').innerHTML = objUserInfo.uEmail.value;  objPayPal.email.value = objUserInfo.uEmail.value;  _el('tAddress1').innerHTML = objUserInfo.uAddress1.value;  objPayPal.address1.value = objUserInfo.uAddress1.value;  _el('tAddress2').innerHTML = objUserInfo.uAddress2.value;  objPayPal.address2.value = objUserInfo.uAddress2.value;  _el('tCity').innerHTML = objUserInfo.uCity.value;  objPayPal.city.value = objUserInfo.uCity.value;  _el('tState').innerHTML = objUserInfo.uState.value;  objPayPal.state.value = objUserInfo.uState.value;  _el('tZip').innerHTML = objUserInfo.uZip.value;  objPayPal.zip.value = objUserInfo.uZip.value;  _el('tCountry').innerHTML = objUserInfo.uCountry.value;  objPayPal.country.value = objUserInfo.uCountry.value;  // Display confirmation screen  _el('orderLoading').style.display = 'none';  _el('orderContent').style.display = 'block';};// Before tab change event handlervar funcOnBeforeTabChange = function(objArgs) {  if (objArgs.newTabId == 'orderTab') {    // Set "Next" button to submit PayPal form    _el('buttonNext').onclick = function() {      document.forms._xclick.submit();    };  } else {    // Set "Next" button to change tab    _el('buttonNext').onclick = function() {      objWizard.nextTab();    };  }  return true;};// After tab change event handlervar funcOnTabChange = function(objArgs) {  if (objArgs.newTabId == 'orderTab') {    // Display message    _el('orderContent').style.display = 'none';    _el('orderLoading').style.display = 'block';  }  // Show Prev button  if (objArgs.newTabId != 'productTab') {    _el('buttonPrev').style.display = 'inline';  } else {    _el('buttonPrev').style.display = 'none';  }};// Initialize Wizardvar objWizard = new Zapatec.TabsWizard({  // Tab bar div id  tabBar: 'tabBar',  // Tabs container div id  tabs: 'tabs',  // Theme path  theme: '<?= ZP_BASE_DIR ?>zptabs/themes/red.css',  // Before tab change event handler  onBeforeTabChange: funcOnBeforeTabChange,  // After tab change event handler  onTabChange: funcOnTabChange,  // Ignore "#tabId" part of URL to prevent opening other tab than  // "Product Info" after initialization  ignoreUrl: true,  // Server script URL  action: 'order.php',  // Id of tab which submits data to the server  submitTabId: 'orderTab',  // Submit method  method: 'POST',  // Form theme  formTheme: '<?= ZP_BASE_DIR ?>zpform/themes/winxp1.css',  // Show error message after the field  showErrors: 'afterField',  // Error handler  onError: funcError,  // Valid handler  onValid: funcValid,  // Success handler  onSuccess: funcSuccess});</script></div></div>	<br/><br/><br/>	<div id="divFooter" class="footer" style='text-align:center; margin-top:2em'>		&copy; 2006 <strong> <a href='http://www.zapatec.com/'>Zapatec, Inc.</a> </strong>	</div></td></tr></table></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -