loaded
10.12.2006, 15:33
wäre ganz nett wenn sich das mal einer ansehen kann. was mir nicht ganz klar ist ob der teil für
country-state-selection noch gebraucht wird ( habe ich weg gelassen).
erstelle catalog/index_ajax.php
inhalt:
<?php
****define('AJAX_APPLICATION_RUNNING', true);
****require('includes/classes/JsHttpRequest.php');
****$JsHttpRequest =& new Subsys_JsHttpRequest_Php('');
****require('includes/application_top.php');
****$JsHttpRequest->setEncoding($_SESSION['language_charset']);
****if (!isset($_GET['module']) || !xtc_not_null($_GET['module']) || !is_file(DIR_WS_MODULES . $_GET['module']. '.php')) die(' ERROR Module "' . $_GET['module'] . '" not define or not exist!!!');
//****if(is_file(DIR_WS_LANGUAGES . $_SESSION['language'] . '/loadXMLstate.php'))
//********require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/loadXMLstate.php');
****require(DIR_WS_MODULES . 'loadStateXML. Anwalt Hammphp');
****exit;
?>
catalog/includes/form_check.js.php
füge ganz oben ein:
<script type="text/javascript" src="jscript/jscript_JsHttpRequest.js"></script>
<script type="text/javascript" src="jscript/jscript_ajax.js"></script>
erstelle catalog/includes/classes/JsHttpRequest.php
inhalt: als datei im Anhang !!!
erstelle catalog/includes/modules/loadStateXML. Anwalt Hammphp
inhalt:<?php
$country = $_REQUEST['country_id'];
****if ( isset($_REQUEST['country_id']) && xtc_not_null($_REQUEST['country_id']) ) {
********$zones_array = array();
********$zones_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' order by zone_name");
********if(xtc_db_num_rows($zones_query) > 0) {
************if(xtc_db_num_rows($zones_query) > 1) {
************while ($zones_values = xtc_db_fetch_array($zones_query)) {
****************$zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
****************}
****************$_RESULT = array("stateXML" => xtc_draw_pull_down_menuNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), $zones_array, $zone_name, 'id="state"'));
************} else {
****************$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), $zones_values['zone_name'], 'id="state"'));
************}
********} else {
************$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), '', 'id="state"'));
********}
****} else {
********$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), '', 'id="state"'));
****}
?>
erstelle catalog/jscript/jscript_ajax.js
inhalt: als datei im Anhang !!!
erstelle catalog/jscript/jscript_JsHttpRequest.js
inhalt: als datei im Anhang !!!
country-state-selection noch gebraucht wird ( habe ich weg gelassen).
erstelle catalog/index_ajax.php
inhalt:
<?php
****define('AJAX_APPLICATION_RUNNING', true);
****require('includes/classes/JsHttpRequest.php');
****$JsHttpRequest =& new Subsys_JsHttpRequest_Php('');
****require('includes/application_top.php');
****$JsHttpRequest->setEncoding($_SESSION['language_charset']);
****if (!isset($_GET['module']) || !xtc_not_null($_GET['module']) || !is_file(DIR_WS_MODULES . $_GET['module']. '.php')) die(' ERROR Module "' . $_GET['module'] . '" not define or not exist!!!');
//****if(is_file(DIR_WS_LANGUAGES . $_SESSION['language'] . '/loadXMLstate.php'))
//********require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/loadXMLstate.php');
****require(DIR_WS_MODULES . 'loadStateXML. Anwalt Hammphp');
****exit;
?>
catalog/includes/form_check.js.php
füge ganz oben ein:
<script type="text/javascript" src="jscript/jscript_JsHttpRequest.js"></script>
<script type="text/javascript" src="jscript/jscript_ajax.js"></script>
erstelle catalog/includes/classes/JsHttpRequest.php
inhalt: als datei im Anhang !!!
erstelle catalog/includes/modules/loadStateXML. Anwalt Hammphp
inhalt:<?php
$country = $_REQUEST['country_id'];
****if ( isset($_REQUEST['country_id']) && xtc_not_null($_REQUEST['country_id']) ) {
********$zones_array = array();
********$zones_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' order by zone_name");
********if(xtc_db_num_rows($zones_query) > 0) {
************if(xtc_db_num_rows($zones_query) > 1) {
************while ($zones_values = xtc_db_fetch_array($zones_query)) {
****************$zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
****************}
****************$_RESULT = array("stateXML" => xtc_draw_pull_down_menuNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), $zones_array, $zone_name, 'id="state"'));
************} else {
****************$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), $zones_values['zone_name'], 'id="state"'));
************}
********} else {
************$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), '', 'id="state"'));
********}
****} else {
********$_RESULT = array("stateXML" => xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? ''.ENTRY_STATE_TEXT.'' : '')), '', 'id="state"'));
****}
?>
erstelle catalog/jscript/jscript_ajax.js
inhalt: als datei im Anhang !!!
erstelle catalog/jscript/jscript_JsHttpRequest.js
inhalt: als datei im Anhang !!!