Das Problem ist, dass ich das Original icht mehr habe, da ich davon ausgegangen bin, dass ich nur einen Link ändere. Ich weiß nicht besonders klug, ich weiß
Das Ganze PHP ist eine Klasse und wird, soweit ich das überblicke, aus einem anderen PHP aufgerufen
aufruf:
Code:
?php
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// Load the HTML class
require_once($mainframe->getPath('front_html'));
switch($task) {
case 'nominieren':
// Display a form
HTML_servicesun::nominierForm();
break;
case 'save':
// Save data from the submitted form
HTML_servicesun::saveAndMail();
break;
case 'display':
HTML_servicesun::displayNominations();
break;
case 'displaycompany':
HTML_servicesun::displayCompany();
break;
case 'activate':
HTML_servicesun::activate();
break;
case 'bewerten':
HTML_servicesun::bewertung();
break;
case 'savebewertung':
HTML_servicesun::saveBewertung();
break;
case 'userfirma':
HTML_servicesun::userfirma();
break;
case 'edituserfirma':
HTML_servicesun::edituserfirma();
break;
case 'saveuserfirma':
HTML_servicesun::saveuserfirma();
break;
default:
// Perhaps display some data, etc
break;
}
?>
und hier die Klasse
Code:
<?php
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
global $database;
class HTML_servicesun {
<weitere funktionen>....
function saveuserfirma(){
echo "Updating...<br>";
//set variables
$id=$_REQUEST[id];
$name1=$_REQUEST['userfirma_name1'];
$apartner=$_REQUEST['userfirma_apartner'];
$strasse=$_REQUEST['userfirma_strasse'];
$plz=$_REQUEST['userfirma_plz'];
$ort=$_REQUEST['userfirma_ort'];
$tel=$_REQUEST['userfirma_tel'];
$tex=$_REQUEST['userfirma_tex'];
$url=$_REQUEST['userfirma_url'];
$mail=$_REQUEST['userfirma_mail'];
$branche1=$_REQUEST['userfirma_branche1'];
$branche2=$_REQUEST['userfirma_branche2'];
$query="UPDATE firma SET
name1='$name1',
branche1='$branche1',
plz='$plz',
ort='$ort',
mail='$mail',
branche2='$branche2',
apartner='$apartner',
tel='$tel',
url='$url',
tex='$tex',
strasse='$strasse'
WHERE id='$id' LIMIT 1";
$result=mysql_query($query) or die(mysql_error());
echo $query."<br>";
$redirect='index.php?option=com_servicesun&task=userfirma';
echo $redirect."<br>";
mosRedirect($redirect);
}
function GetBranche($param){
//print "Verbindung zu Tabelle Hergestellt<p>";
$sSql = "SELECT ddID, label, value, input FROM dropdown WHERE value = '$param' ORDER BY input";
$res1 = mysql_query($sSql);
$row = mysql_fetch_array($res1);
return $row['input'];
}
}
?>
Lesezeichen