add counter und fix language entrys
git-svn-id: svn://svn.cccv.de/engel-system@61 29ba0400-6e00-0410-a75a-ca02368028f8main
parent
0be1122047
commit
283d16d543
@ -0,0 +1,24 @@
|
|||||||
|
<?PHP
|
||||||
|
|
||||||
|
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"". $Page["Name"]. "\"";
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
|
echo mysql_error($con);
|
||||||
|
|
||||||
|
if(mysql_num_rows($Erg)==0)
|
||||||
|
{
|
||||||
|
// echo "Counter: 1";
|
||||||
|
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
|
||||||
|
"VALUES ('". $Page["Name"]. "', '1');";
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
}
|
||||||
|
elseif(mysql_num_rows($Erg)==1)
|
||||||
|
{
|
||||||
|
// echo "Counter: ". (mysql_result($Erg, 0, 0)+1);
|
||||||
|
$SQL = "UPDATE `Counter` SET `Anz` = '". (mysql_result($Erg, 0, 0) +1). "' ".
|
||||||
|
"WHERE `URL` = '". $Page["Name"]. "' LIMIT 1 ;";
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -1,30 +1,39 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
|
|
||||||
function Get_Text ($TextID)
|
|
||||||
{
|
|
||||||
if( !isset($_SESSION['Sprache'])) $_SESSION['Sprache'] = "EN";
|
if( !isset($_SESSION['Sprache'])) $_SESSION['Sprache'] = "EN";
|
||||||
if( $_SESSION['Sprache']=="") $_SESSION['Sprache']="EN";
|
if( $_SESSION['Sprache']=="") $_SESSION['Sprache']="EN";
|
||||||
|
|
||||||
GLOBAL $con;
|
function Get_Text ($TextID)
|
||||||
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
{
|
||||||
@$Erg = mysql_query($SQL, $con);
|
|
||||||
if(!mysql_error($con))
|
GLOBAL $con;
|
||||||
|
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
||||||
|
@$Erg = mysql_query($SQL, $con);
|
||||||
|
// if(!mysql_error($con))
|
||||||
|
if( mysql_num_rows( $Erg) == 1)
|
||||||
return (@mysql_result($Erg, 0, "Text"));
|
return (@mysql_result($Erg, 0, "Text"));
|
||||||
else
|
else
|
||||||
return "Error Data";
|
{
|
||||||
|
// die("Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x");
|
||||||
|
return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Print_Text ($TextID){
|
function Print_Text ($TextID)
|
||||||
GLOBAL $con;
|
{
|
||||||
|
GLOBAL $con;
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
||||||
@$Erg = mysql_query($SQL, $con);
|
@$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
if(!mysql_error($con))
|
// if(!mysql_error($con))
|
||||||
|
if( mysql_num_rows( $Erg) == 1)
|
||||||
echo nl2br(@mysql_result($Erg, 0, "Text"));
|
echo nl2br(@mysql_result($Erg, 0, "Text"));
|
||||||
else
|
else
|
||||||
echo "Error Data";
|
{
|
||||||
|
echo "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue