Файл: Проце‬ссы при‬нятия решений в организации.pdf

ВУЗ: Не указан

Категория: Курсовая работа

Дисциплина: Не указана

Добавлен: 14.03.2024

Просмотров: 50

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

if(!is_error) if(!checkChar(wert,"0123456789") || wert == "" || wert.length!=8) {alert("BLZ muss aus 8 Ziffern bestehen"); is_error=true;} wert = document.getElementById("sammel_input_bank").value;

if(!is_error) if(wert == "") {alert("Bitte Bankname eintragen"); is_error=true;} wert = document.getElementById("sammel_input_homepage").value;

if(!is_error) if(wert == "") {alert("Bitte Homepage eintragen"); is_error=true;} wert = document.getElementById("sammel_input_email").value;

if(!is_error) if(wert == "") {alert("Bitte Email-Adresse eintragen"); is_error=true;} //if(!is_error) if(document.getElementById("sammel_input_ustid").value == "" && document.getElementById("sammel_input_steuernummer").value == "") {alert("Bitte alle Pflichtfelder ausfьllen"); is_error=true;} wert1 = document.getElementById("sammel_input_telefon").value;

wert2 = document.getElementById("sammel_input_mobil").value;

if(!is_error) if(wert1 == "" && wert2 == "") {alert("Es muss mindestens ein telefonischer Kontakt angegeben sein"); is_error=true;} // adjust Backlink document.getElementsByName("user[backlink]")[0].value += "&konto_inhaber=" + escape(document.getElementById("sammel_input_konto_inhaber").value);

document.getElementsByName("user[backlink]")[0].value += "&konto_nr=" + escape(document.getElementById("sammel_input_kontonummer").value);

document.getElementsByName("user[backlink]")[0].value += "&konto_blz=" + escape(document.getElementById("sammel_input_blz").value);

document.getElementsByName("user[backlink]")[0].value += "&konto_bank=" + escape(document.getElementById("sammel_input_bank").value);

if(!is_error) document.getElementById("form").submit();

</script> <style> input {Font-family:tahoma,arial,verdana; font-size:11px; color:#666666; background-color:#FFFFFF; border:1px solid #808080;} select {Font-family:tahoma,arial,verdana; font-size:11px; color:#666666; background-color:#FFFFFF; border:1px solid #808080;} </style> <body background="https://www.sofortueberweisung.de/cms/design/kachel.gif" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0" onload="javascript:init()"> <form method="post" action="https://www.sofort-ueberweisung.de/createnew.php" id="form"> <table align="center" width="970" height="205" border="0" cellpadding="0" cellspacing="0"> <td> <img src="https://www.sofortueberweisung.de/grafik/head_image.gif" /> </td> <img src="https://www.sofortueberweisung.de/cms/p.gif" width=5 height=5 alt="" border=0 vspace=0 hspace=0> </td> <table align="center" width="970" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="https://www.sofortueberweisung.de/cms/design/content_01.gif" width="190" height="10" alt="" border=0 vspace=0 hspace=0></td> <td><img src="https://www.sofortueberweisung.de/cms/design/content_02.gif" width="212" height="10" alt="" border=0 vspace=0 hspace=0></td> <td align="right"><img src="https://www.sofortueberweisung.de/cms/design/content_03.gif" width="568" height="10" alt="" border=0 vspace=0 hspace=0></td> </tr> </table> <td bgcolor="white"> <table width="100%" border="0"> <tr> <td width="50%"> <table border="0" cellpadding="2" cellspacing="0" style="padding-left: 20px;">

<tr><td>Projektname*</td><td><input id="sammel_input_project_name" size="40" type="text" value="<?php echo STORE_NAME; ?>" onkeyup="javascript:giveValue(this.value,"project[projekt_name]", "", "", "", "")"></td></tr> <tr><td>Projektbeschreibung</td><td><input size="40" type="text" onkeyup="javascript:giveValue(this.value,"project[projekt_beschreibung]", "", "", "", "" )"></td></tr> <tr><td colspan="2"><hr /></td></tr> <tr><td>Anrede</td><td><input size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[r_anrede]","user[anspr_anrede]","project[anrede]", "", "")"></td></tr> <tr><td>Name*</td><td><input id="sammel_input_name" value="<?php echo STORE_OWNER; ?>" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[r_name]","user[anspr_name]","project[name]", "", "")"> <tr><td>Firma*</td><td><input id="sammel_input_firma" size="40" type="text" value="<?php echo STORE_NAME; ?>" onkeyup="javascript:giveValue(this.value,"user[firma]","user[r_firma]","project[firma]", "", "")"></td></tr> <tr><td>Rechtsform</td><td> <select onchange="javascript:giveValue(this.value,"user[rechtsform]", "", "", "", "")"> <option value="">Bitte auswдhlen...</option> <option value="AG" >AG</option> <option value="AG & Co. OHG" >AG & Co. OHG</option> <option value="ARGE" >ARGE</option> <option value="e.G." >e.G.</option> <option value="e.K." >e.K.</option> <option value="e.V." >e.V.</option> <option value="GbR" >GbR</option> <option value="GmbH" >GmbH</option> <option value="GmbH & Co. KG" >GmbH & Co. KG</option> <option value="GmbH & Co. OHG" >GmbH & Co. OHG</option> <option value="KG" >KG</option> <option value="KGaA" >KGaA</option> <option value="OHG" >OHG</option> <option value="Selbststдndig" >Selbststдndig</option> <option value="VvAG" >VvAG</option> <option value="Sonstige" >Sonstige</option> </select> <tr><td>Strasse*</td><td><input id="sammel_input_strasse" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[strasse]","user[r_strasse]","project[strasse]", "", "")"></td></tr> <tr><td>PLZ*</td><td><input maxlength="5" id="sammel_input_plz" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[plz]","user[r_plz]","project[plz]", "", "")"></td></tr> <tr><td>Ort*</td><td><input id="sammel_input_ort" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[ort]","user[r_ort]","project[ort]", "", "")"></td></tr> <tr><td>Land*</td><td><input id="sammel_input_land" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[land]","user[r_land]","project[land]", "", "")"></td></tr> <tr><td>Telefon+</td><td><input id="sammel_input_telefon" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[telefon]","user[anspr_fon]","project[telefon]", "", "")"></td></tr> <tr><td>Mobil+</td><td><input id="sammel_input_mobil" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[anspr_mobil]", "", "", "", "")"></td></tr> <tr><td>Telefax</td><td><input size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[anspr_fax]","project[telefax]","user[telefax]", "", "")"></td></tr> <tr><td colspan="2"><hr /></td></tr> <tr><td colspan="2"><b>Konto auf welches die Zahlungseingдnge gutgeschrieben werden:</b></td></tr> <tr><td>Konto Inhaber*</td><td><input id="sammel_input_konto_inhaber" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[elv_konto_inhaber]", "project[an_konto_inhaber]", "", "", "")"></td></tr> <tr><td>Kontonummer*</td><td><input maxlength="15" id="sammel_input_kontonummer" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[elv_konto_nr]", "project[an_konto_nr]", "", "", "")"></td></tr> <tr><td>Bankleitzahl*</td><td><input maxlength="8" id="sammel_input_blz" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[elv_konto_blz]", "project[an_konto_blz]", "", "", "")"></td></tr> <tr><td>Name der Bank*</td><td><input id="sammel_input_bank" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[elv_konto_bank]", "project[an_konto_bank]", "", "", "")"></td></tr> <tr><td colspan="2"><b>Hiermit beauftrage ich Sie, die fдlligen <a href="https://www.sofortueberweisung.de/cms/index.php?plink=tarife&l=1&fs=" target="_blank">Betrдge</a> per Lastschrift von meinem Konto einzuziehen.</b></td></tr> <tr><td>Ustid</td><td><input id="sammel_input_ustid" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[ustid]", "", "", "", "")"></td></tr> <tr><td>Steuernr</td><td><input id="sammel_input_steuernummer" size="40" type="text" onkeyup="javascript:giveValue(this.value,"user[steuernr]", "", "", "", "")"></td></tr> <tr><td>Homepage*</td><td><input id="sammel_input_homepage" size="40" type="text" value="<?php echo tep_catalog_href_link();?>" onkeyup="javascript:giveValue(this.value,"project[homepage]","user[homepage]", "", "", "")"></td></tr> <tr><td>Email*</td><td><input id="sammel_input_email" size="40" type="text" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>" onkeyup="javascript:giveValue(this.value,"user[r_email]","user[anspr_email]","project[email]","user[email]","alert[alert_email_adresse]")"></td></tr> <tr><td>Email-Benachrichtigungen bei Zahlungseingдngen aktivieren:</td> <td><input type="radio" name="sammel_input_email_flag" value="1" CHECKED onfocus="javascript:giveValue(this.value,"alert[alert_email_status]", "", "", "", "")"> Ja <input type="radio" name="sammel_input_email_flag" value="0" onfocus="javascript:giveValue(this.value,"alert[alert_email_status]", "", "", "", "")"> Nein</td> </tr> <tr> <td colspan="2"> <input type="button" name="Absenden" value="Absenden" onclick="javascript:submitForm()"><br><b>Nach der Registrierung des Projekts bei Sofortьberweisung, unbedingt dem Link zurьck zum Shop folgen!</b> </td> </tr> </table> </td> <td valign="top" align="left"> <table border="0" cellspacing="0"> <tr><td><a href="#" onclick="javascript:toggleTableById("table2")"><u>Alternative Rechnungsanschrift</u></a></td></tr> <tr><td> <table border="0" cellspacing="0" id="table2" style="display:none"> <tr><td>Anrede</td><td><input size="40" type="text" name="user[r_anrede]" value=""></td></tr> <tr><td>Firma</td><td><input size="40" type="text" name="user[r_firma]" value="<?php echo STORE_NAME; ?>"></td></tr> <tr><td>Name</td><td><input size="40" type="text" name="user[r_name]" value=""></td></tr> <tr><td>Strasse</td><td><input size="40" type="text" name="user[r_strasse]" value=""></td></tr> <tr><td>Plz</td><td><input size="40" type="text" name="user[r_plz]" value=""></td></tr> <tr><td>Ort</td><td><input size="40" type="text" name="user[r_ort]" value=""></td></tr> <tr><td>Land</td><td><input size="40" type="text" name="user[r_land]" value=""></td></tr> <tr><td>Email</td><td><input size="40" type="text" name="user[r_email]" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td></tr> </table> </td></tr> <table border="0" cellspacing="0"> <tr><td><a href="#" onclick="javascript:toggleTableById("table4")"><u>Alternativer Ansprechpartner</u></a></td></tr> <tr><td> <table border="0" cellspacing="0" id="table4" style="display:none"> <tr><td>Anrede</td><td><input size="40" type="text" name="user[anspr_anrede]" value=""></td><td>&nbsp;</td></tr> <tr><td>Name</td><td><input size="40" type="text" name="user[anspr_name]" value=""></td><td>&nbsp;</td></tr> <tr><td>Telefon</td><td><input size="40" type="text" name="user[anspr_fon]" value=""></td><td>&nbsp;</td></tr> <tr><td>Telefax</td><td><input size="40" type="text" name="user[anspr_fax]" value=""></td><td>&nbsp;</td></tr> <tr><td>Mobil</td><td><input size="40" type="text" name="user[anspr_mobil]" value=""></td><td>&nbsp;</td></tr> <tr><td>Email</td><td><input size="40" type="text" name="user[anspr_email]" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td><td>&nbsp;</td></tr> </table> </td></tr> </table> </tr> <tr><td style="padding-left: 20px;">* zeichnet Pflichtfelder aus<br />+ zeichnet Felder aus, bei denen mindestens eines gefьllt sein muss<br />Alle Zahlen sind ohne Leerzeichen einzugeben</td></tr> </table> </td></tr> <table width="970" border="0" cellspacing="0" cellpadding="0"> <td width="190" valign="top"><img src="https://www.sofortueberweisung.de/cms/design/content_11.gif" width=190 height=10 alt="" border=0 vspace=0 hspace=0></td> <td bgcolor="white"><img src="https://www.sofortueberweisung.de/cms/p.gif" width=5 height=10 alt="" border=0 vspace=0 hspace=0></td> <td align="right" width="568"><img src="https://www.sofortueberweisung.de/cms/design/content_13.gif" width=568 height=10 alt="" border=0 vspace=0 hspace=0></td> </tr> <table border="1" id="table1" style="display:none;">


<tr><td>Benutzername:</td><td><input type="text" name="user[user]" value="<?php echo STORE_OWNER; ?>"></td><td>*</td></tr> <tr><td>Firma</td><td><input type="text" name="user[firma]" value="<?php echo STORE_NAME; ?>"></td><td>*</td></tr> <tr><td>Rechtsform</td><td><input type="text" name="user[rechtsform]" value=""></td><td>&nbsp;</td></tr> <tr><td>Strasse</td><td><input type="text" name="user[strasse]" value=""></td><td>*</td></tr> <tr><td>Plz</td><td><input type="text" name="user[plz]" value=""></td><td>*</td></tr> <tr><td>Ort</td><td><input type="text" name="user[ort]" value=""></td><td>*</td></tr> <tr><td>Land</td><td><input type="text" name="user[land]" value=""></td><td>*</td></tr> </table> <table border="1" id="table3" style="display:none"> <tr><td>Telefon</td><td><input type="text" name="user[telefon]" value=""></td><td>&nbsp;</td></tr> <tr><td>Telefax</td><td><input type="text" name="user[telefax]" value=""></td><td>&nbsp;</td></tr> <tr><td>Email</td><td><input type="text" name="user[email]" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td><td>*</td></tr> <tr><td>Homepage</td><td><input type="text" name="user[homepage]" value="<?php echo tep_catalog_href_link();?>"></td><td>&nbsp;</td></tr> <tr><td>Ustid</td><td><input type="text" name="user[ustid]" value=""></td><td>*</td></tr> <tr><td>Steuernr</td><td><input type="text" name="user[steuernr]" value=""></td><td>*</td></tr> <table border="1" id="table5" style="display:none;">

<tr><td colspan=3>Konto, von dem die Gebьhren von Sofort-Ьberweisung abgebucht werden:</td></tr> <tr><td>Konto Inhaber</td><td><input type="text" name="user[elv_konto_inhaber]" value=""></td><td>*</td></tr> <tr><td>Kontonr</td><td><input type="text" name="user[elv_konto_nr]" value=""></td><td>*</td></tr> <tr><td>Konto BLZ</td><td><input type="text" name="user[elv_konto_blz]" value=""></td><td>*</td></tr> <tr><td>Konto Bank</td><td><input type="text" name="user[elv_konto_bank]" value=""></td><td>*</td></tr> <table border="0" cellspacing="0" id="table6" style="display:none"> <tr><td>Name</td><td><input type="text" name="project[projekt_name]" value="<?php echo STORE_NAME; ?>"></td><td>*</td></tr> <tr><td>Beschreibung</td><td><input type="text" name="project[projekt_beschreibung]" value=""></td><td>&nbsp;</td></tr> <tr><td>Anrede</td><td><input type="text" name="project[anrede]" value=""></td><td>*</td></tr> <tr><td>Firma</td><td><input type="text" name="project[firma]" value="<?php echo STORE_NAME; ?>"></td><td>*</td></tr> <tr><td>Name</td><td><input type="text" name="project[name]" value="<?php echo STORE_OWNER; ?>"></td><td>*</td></tr> <tr><td>Strasse</td><td><input type="text" name="project[strasse]" value=""></td><td>*</td></tr> <tr><td>Plz</td><td><input type="text" name="project[plz]" value=""></td><td>*</td></tr> <tr><td>Ort</td><td><input type="text" name="project[ort]" value=""></td><td>*</td></tr> <tr><td>Land</td><td><input type="text" name="project[land]" value=""></td><td>*</td></tr> <tr><td>Telefon</td><td><input type="text" name="project[telefon]" value=""></td><td>*</td></tr> <tr><td>Telefax</td><td><input type="text" name="project[telefax]" value=""></td><td>*</td></tr> <tr><td>Email</td><td><input type="text" name="project[email]" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td><td>*</td></tr> <tr><td>Homepage</td><td><input type="text" name="project[homepage]" value="<?php echo tep_catalog_href_link();?>"></td><td>*</td></tr> <table border="1" id="table7" style="display:none"> <tr><td>Email</td><td><input type="text" name="alert[alert_email_adresse]" value="<?php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td><td>&nbsp;</td></tr> <tr><td>Email Benachrichtigung bei Zahlungseingang aktivieren</td><td><input type="text" name="alert[alert_email_status]" value="1"></td><td>&nbsp;</td></tr> <input type="hidden" name="user[backlink]" value="<?php echo $backlink; ?>">


<input type="hidden" name="user[vpartner]" value="21"> <input type="hidden" name="project[html_abortlink]" value="<?php echo $html_abortlink; ?>">

<input type="hidden" name="project[header_redir_do]" value="1"> <input type="hidden" name="project[header_redir_url]" value="<?php echo $header_redir_url; ?>">

<input type="hidden" name="project[const_betrag]" value="1"> <input type="hidden" name="project[const_v_zweck_1]" value="1"> <input type="hidden" name="project[const_v_zweck_2]" value="1"> <input type="hidden" name="project[use_input_passwort]" value="1"> <input type="hidden" name="project[an_konto_inhaber]" value=""> <input type="hidden" name="project[an_konto_nr]" value=""> <input type="hidden" name="project[an_konto_blz]" value=""> <input type="hidden" name="project[an_konto_bank]" value=""> <input type="hidden" name="project[input_passwort]" value="<?php echo $parameter["input_passwort"]; ?>">

<input type="hidden" name="project[content_passwort]" value="<?php echo $parameter["cnt_passwort"]; ?>">

<input type="hidden" name="project[shopsystem]" value="<?php echo PROJECT_VERSION; ?>">

<input type="hidden" name="alert[alert_passwort]" value="<?php echo $parameter["bna_passwort"]; ?>">

<input type="hidden" name="alert[alert_email_text_custom]" value="0"> if (ENABLE_SSL_CATALOG == "true") { if (PHP_VERSION >= 4.1) { $HTTP_GET_VARS =& $_GET;

$HTTP_POST_VARS =& $_POST;

$HTTP_COOKIE_VARS =& $_COOKIE;

$HTTP_SESSION_VARS =& $_SESSION;

$HTTP_POST_FILES =& $_FILES;

$HTTP_SERVER_VARS =& $_SERVER;

if (!is_array($HTTP_GET_VARS)) $HTTP_GET_VARS = array();

if (!is_array($HTTP_POST_VARS)) $HTTP_POST_VARS = array();

if (!is_array($HTTP_COOKIE_VARS)) $HTTP_COOKIE_VARS = array();

// handle magic_quotes_gpc turned off.

if (!get_magic_quotes_gpc()) { do_magic_quotes_gpc($HTTP_GET_VARS);

do_magic_quotes_gpc($HTTP_POST_VARS);

do_magic_quotes_gpc($HTTP_COOKIE_VARS);

if (!function_exists("is_numeric")) { function is_numeric($param) { return ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $param);

if (!function_exists("is_uploaded_file")) { function is_uploaded_file($filename) { if (!$tmp_file = get_cfg_var("upload_tmp_dir")) { $tmp_file = dirname(tempnam("", ""));

if (strchr($tmp_file, "/")) { if (substr($tmp_file, -1) != "/") $tmp_file.= "/";

} elseif (strchr($tmp_file, "\\")) { if (substr($tmp_file, -1) != "\\") $tmp_file.= "\\";

return file_exists($tmp_file. basename($filename));

if (!function_exists("move_uploaded_file")) { function move_uploaded_file($file, $target) { return copy($file, $target);

if (!function_exists("checkdnsrr")) { function checkdnsrr($host, $type) { if(tep_not_null($host) && tep_not_null($type)) { @exec("nslookup -type=$type $host", $output);

while(list($k, $line) = each($output)) { if(eregi("^$host", $line)) { return true;

if (!function_exists("in_array")) { function in_array($lookup_value, $lookup_array) { reset($lookup_array);

while (list($key, $value) = each($lookup_array)) { if ($value == $lookup_value) return true;

if (!function_exists("array_merge")) { function array_merge($array1, $array2, $array3 = "") { if ($array3 == "") $array3 = array();

while (list($key, $val) = each($array1)) $array_merged[$key] = $val;

while (list($key, $val) = each($array2)) $array_merged[$key] = $val;

if (sizeof($array3) > 0) while (list($key, $val) = each($array3)) $array_merged[$key] = $val;

return (array)$array_merged;

if (!function_exists("array_shift")) { function array_shift(&$array) { $i = 0;

$shifted_array = array();

reset($array);

while (list($key, $value) = each($array)) { if ($i > 0) { $shifted_array[$key] = $value;

} else { $return = $array[$key];

$i++;

$array = $shifted_array;

return $return;

if (!function_exists("array_reverse")) { function array_reverse($array) { $reversed_array = array();

for ($i=sizeof($array)-1; $i>=0; $i--) { $reversed_array[] = $array[$i];

return $reversed_array;

if (!function_exists("array_slice")) { function array_slice($array, $offset, $length = "0") { $length = abs($length);

if ($length == 0) { $high = sizeof($array);


$high = $offset+$length;

for ($i=$offset; $i<$high; $i++) { $new_array[$i-$offset] = $array[$i];

return $new_array;* http_build_query() natively supported from PHP 5.0

* From Pear::PHP_Compat */ if ( !function_exists("http_build_query") && (PHP_VERSION >= 4)) { function http_build_query($formdata, $numeric_prefix = null, $arg_separator = null) { // If $formdata is an object, convert it to an array if ( is_object($formdata) ) { $formdata = get_object_vars($formdata);

// Check we have an array to work with if ( !is_array($formdata) || !empty($formdata) ) { return false;

// Argument seperator if ( empty($arg_separator) ) { $arg_separator = ini_get("arg_separator.output");

if ( empty($arg_separator) ) { $arg_separator = "&";

// Start building the query $tmp = array();

foreach ( $formdata as $key => $val ) { if ( is_null($val) ) { continue;

if ( is_integer($key) && ( $numeric_prefix != null ) ) { $key = $numeric_prefix. $key;

if ( is_scalar($val) ) { array_push($tmp, urlencode($key). "=". urlencode($val));

// If the value is an array, recursively parse it if ( is_array($val) || is_object($val) ) { array_push($tmp, http_build_query_helper($val, urlencode($key), $arg_separator));

// The value is a resource return null;

return implode($arg_separator, $tmp);

// Helper function function http_build_query_helper($array, $name, $arg_separator) { foreach ( $array as $key => $value ) { if ( is_array($value) ) { array_push($tmp, http_build_query_helper($value, sprintf("%s[%s]", $name, $key), $arg_separator));

} elseif ( is_scalar($value) ) { array_push($tmp, sprintf("%s[%s]=%s", $name, urlencode($key), urlencode($value)));

} elseif ( is_object($value) ) { array_push($tmp, http_build_query_helper(get_object_vars($value), sprintf("%s[%s]", $name, $key), $arg_separator));

* stripos() natively supported from PHP 5.0

if (!function_exists("stripos")) { function stripos($haystack, $needle, $offset = null) { $fix = 0;

if (!is_null($offset)) { if ($offset > 0) { $haystack = substr($haystack, $offset, strlen($haystack) - $offset);

$fix = $offset;

$segments = explode(strtolower($needle), strtolower($haystack), 2);

// Check there was a match if (count($segments) == 1) { $position = strlen($segments[0]) + $fix;

<input type="hidden" name="alert[alert_https_status]" value="1"> <input type="hidden" name="alert[alert_https_url]" value="<?php echo $alert_http_url; ?>">

<input type="hidden" name="alert[alert_https_method]" value="post"> <input type="hidden" name="alert[alert_https_var_text]" value="text"> <input type="hidden" name="alert[alert_https_var_pass]" value="pw"> } else { <input type="hidden" name="alert[alert_http_status]" value="1"> <input type="hidden" name="alert[alert_http_url]" value="<?php echo $alert_http_url; ?>">

<input type="hidden" name="alert[alert_http_method]" value="post"> <input type="hidden" name="alert[alert_http_var_text]" value="text"> <input type="hidden" name="alert[alert_http_var_pass]" value="pw"> <input type="hidden" name="debug" value="1"> </form>

class CI_DB_active_record extends CI_DB_driver { var ar_select array();

var ar_distinct FALSE;

var ar_from array(); var ar_join array();

var ar_where array(); var ar_like array();

var ar_groupby array(); var ar_having array();

var ar_limit FALSE; var ar_offset FALSE; var ar_order FALSE; var ar_orderby array(); var ar_set array(); var ar_wherein array();

var ar_aliased_tables array(); var ar_store_array array();

Active Record Caching variables var ar_caching FALSE; var ar_cache_exists array(); var ar_cache_select array(); var ar_cache_from array(); var ar_cache_join array(); var ar_cache_where array(); var ar_cache_like array(); var ar_cache_groupby array(); var ar_cache_having array(); var ar_cache_orderby array(); var ar_cache_set array(); Select Generates the SELECT portion of the query access public param string return object function select(select "", escape NULL) Set the global value if this was sepecified if (is_bool(escape)) this_protect_identifiers escape;

if (is_string(select)) select explode(",", select);

foreach (select as val) val trim(val); if (val ! "") thisar_select val; if (thisar_caching TRUE) thisar_cache_select val;


thisar_cache_exists "select"; return this;

Select Max Generates a SELECT MAX(field) portion of a query access public param string the field param string an alias return object function select_max(select "", alias "") return this_max_min_avg_sum(select, alias, "MAX");

Select Min Generates a SELECT MIN(field) portion of a query access public param string the field param string an alias return object function select_min(select "", alias "") return this_max_min_avg_sum(select, alias, "MIN");

Select Average Generates a SELECT AVG(field) portion of a query access public param string the field param string an alias return object function select_avg(select "", alias "") return this_max_min_avg_sum(select, alias, "AVG");

Select Sum Generates a SELECT SUM(field) portion of a query access public param string the field param string an alias return object function select_sum(select "", alias "") return this_max_min_avg_sum(select, alias, "SUM");

Processing Function for the four functions above:

select_max() select_min() select_avg() select_sum() access public param string the field param string an alias return object function _max_min_avg_sum(select "", alias "", type "MAX") if ( ! is_string(select) OR select "") thisdisplay_error("db_invalid_query");

type strtoupper(type);

if ( ! in_array(type, array("MAX", "MIN", "AVG", "SUM"))) show_error("Invalid function type: ".type);

if (alias "") alias this_create_alias_from_table(trim(select));

sql type."(".this_protect_identifiers(trim(select)).") AS ".alias;

thisar_select sql;

if (thisar_caching TRUE) thisar_cache_select sql;

thisar_cache_exists "select";

return this;

Determines the alias name based on the table access private param string return string function _create_alias_from_table(item) if (strpos(item, ".") ! FALSE) return end(explode(".", item));

return item;

DISTINCT Sets a flag which tells the query string compiler to add DISTINCT access public param bool return object function distinct(val TRUE) thisar_distinct (is_bool(val)) ? val: TRUE;

return this;

From Generates the FROM portion of the query access public param mixed can be a string or array return object function from(from) foreach ((array)from as val) if (strpos(val, ",") ! FALSE) foreach (explode(",", val) as v) v trim(v);

this_track_aliases(v);

thisar_from this_protect_identifiers(v, TRUE, NULL, FALSE);

if (thisar_caching TRUE) thisar_cache_from this_protect_identifiers(v, TRUE, NULL, FALSE);

thisar_cache_exists "from";

} else val trim(val);

Extract any aliases that might exist. We use this information in the _protect_identifiers to know whether to add a table prefix this_track_aliases(val);

thisar_from this_protect_identifiers(val, TRUE, NULL, FALSE);

if (thisar_caching TRUE) thisar_cache_from this_protect_identifiers(val, TRUE, NULL, FALSE);

thisar_cache_exists "from";

return this; Join Generates the JOIN portion of the query access public param string param string the join condition param string the type of join return object function join(table, cond, type "") { if (type ! "")

type strtoupper(trim(type));

if ( ! in_array(type, array("LEFT", "RIGHT", "OUTER", "INNER", "LEFT OUTER", "RIGHT OUTER"))) type "";

else type. " ";

Extract any aliases that might exist. We use this information in the _protect_identifiers to know whether to add a table prefix this_track_aliases(table);

Strip apart the condition and protect the identifiers if (preg_match("(+)(+)(.+)", cond, match)) match this_protect_identifiers(match);

match this_protect_identifiers(match);

cond match.match.match;

Assemble the JOIN statement join type."JOIN ".this_protect_identifiers(table, TRUE, NULL, FALSE)." ON ".cond;

thisar_join join;

if (thisar_caching TRUE) thisar_cache_join join;

thisar_cache_exists "join";

return this; Where Generates the WHERE portion of the query. Separates multiple calls with AND access public param mixed param mixed return object function where(key, value NULL, escape TRUE) return this_where(key, value, "AND ", escape);

OR Where Generates the WHERE portion of the query. Separates multiple calls with OR access public param mixed param mixed return object function or_where(key, value NULL, escape TRUE) return this_where(key, value, "OR ", escape); orwhere() is an alias of or_where() this function is here for backwards compatibility, as orwhere() has been deprecated function orwhere(key, value NULL, escape TRUE) return thisor_where(key, value, escape); Where Called by where() or orwhere() access private param mixed param mixed param string return object function _where(key, value NULL, type "AND ", escape NULL) if ( ! is_array(key)) key array(key value);