Aktív témák
-
Ghostika
csendes tag
Azt raktam be de akkor ezt írja ki.
De próbáltam már alőzővel is és akkor is ezt írta ki.
itt az egész forráskód:
<?php require_once('Connections/my_Conn.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS[''PHP_SELF'';
?>
<?php
session_start();
function GetSQLValueString($theValue, $theType, $theDefinedValue = '''', $theNotDefinedValue = '''')
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case ''text'':
$theValue = ($theValue != '''') ? ''''' . $theValue . ''''' : ''NULL'';
break;
case ''long'':
case ''int'':
$theValue = ($theValue != '''') ? intval($theValue) : ''NULL'';
break;
case ''double'':
$theValue = ($theValue != '''') ? ''''' . doubleval($theValue) . ''''' : ''NULL'';
break;
case ''date'':
$theValue = ($theValue != '''') ? ''''' . $theValue . ''''' : ''NULL'';
break;
case ''defined'':
$theValue = ($theValue != '''') ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $HTTP_SERVER_VARS['PHP_SELF';
if (isset($HTTP_SERVER_VARS['QUERY_STRING')) {
$editFormAction .= ''?'' . $HTTP_SERVER_VARS['QUERY_STRING';
}
if ((isset($HTTP_POST_VARS[''MM_insert'')) && ($HTTP_POST_VARS[''MM_insert''
== ''form1'')) {
$insertSQL = sprintf(''INSERT INTO tema (cim) VALUES (%s)'',
GetSQLValueString($HTTP_POST_VARS['cim', ''text''));
mysql_select_db($database_my_Conn, $my_Conn);
$Result1 = mysql_query($insertSQL, $my_Conn) or die(mysql_error());
$insertGoTo = ''new_theme.php'';
if (isset($HTTP_SERVER_VARS['QUERY_STRING')) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? ''&'' : ''?'';
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING';
}
header(sprintf(''Location: %s'', $insertGoTo));
}
$maxRows_tema = 3;
$pageNum_tema = 0;
if (isset($HTTP_GET_VARS['pageNum_tema')) {
$pageNum_tema = $HTTP_GET_VARS['pageNum_tema';
}
$startRow_tema = $pageNum_tema * $maxRows_tema;
mysql_select_db($database_my_Conn, $my_Conn);
$query_tema = ''SELECT * FROM tema'';
$query_limit_tema = sprintf(''%s LIMIT %d, %d'', $query_tema, $startRow_tema, $maxRows_tema);
$tema = mysql_query($query_limit_tema, $my_Conn) or die(mysql_error());
$row_tema = mysql_fetch_assoc($tema);
if (isset($HTTP_GET_VARS['totalRows_tema')) {
$totalRows_tema = $HTTP_GET_VARS['totalRows_tema';
} else {
$all_tema = mysql_query($query_tema);
$totalRows_tema = mysql_num_rows($all_tema);
}
$totalPages_tema = ceil($totalRows_tema/$maxRows_tema)-1;
mysql_select_db($database_my_Conn, $my_Conn);
$query_counter =''select tema_id, cim, count(hozzaszolas_id) as hozzaszolas from tema left outer join hozzaszolas on tema.tema_id=hozzaszolas.tema_id group by tema_id,cim'';
$counter = mysql_query($query_counter, $my_Conn) or die(mysql_error());
$row_counter = mysql_fetch_assoc($counter);
$totalRows_counter = mysql_num_rows($counter);
$queryString_tema = '''';
if (!empty($HTTP_SERVER_VARS['QUERY_STRING')) {
$params = explode(''&'', $HTTP_SERVER_VARS['QUERY_STRING');
$newParams = array();
foreach ($params as $param) {
if (stristr($param, ''pageNum_tema'') == false &&
stristr($param, ''totalRows_tema'') == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_tema = ''&'' . implode(''&'', $newParams);
}
}
$queryString_tema = sprintf(''&totalRows_tema=%d%s'', $totalRows_tema, $queryString_tema);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=''Content-Type'' content=''text/html; charset=iso-8859-1''>
</head>
<body>
<form name=''form1'' method=''POST'' action=''<?php echo $editFormAction; ?>''>
<table width=''400'' border=''0'' cellspacing=''5'' cellpadding=''0''>
<tr>
<td>Új Téma Neve:</td>
<td><input name=''cim'' type=''text'' id=''cim''></td>
</tr>
<tr>
<td> </td>
<td><input type=''submit'' name=''Submit'' value=''Új téma''></td>
</tr>
</table>
<a href=''hozza.php?tema_id=<?php echo $row_tema['tema_id'; ?>''><?php echo $row_tema['cim'
; ?></a>
<input type=''hidden'' name=''tag_id'' value=''<?php echo $_SESSION[''tag_id''; ?>''>
<input type=''hidden'' name=''MM_insert'' value=''form1''>
</form>
<p>Témák:</p>
<p>
<?php do { ?>
</p>
<table width=''400'' border=''0'' cellspacing=''0'' cellpadding=''0''>
<tr>
<td width=''250''> </td>
<td width=''150''> <?php echo $row_tema['hozzaszolas'; ?> </td>
</tr>
</table>
<p><img src=''shim.gif'' width=''1'' height=''10''>
<?php } while ($row_tema = mysql_fetch_assoc($tema)); ?>
<table border=''0'' width=''31%'' align=''center''>
<tr>
<td width=''31%'' align=''center''> <?php if ($pageNum_tema > 0) { // Show if not first page ?>
<a href=''<?php printf(''%s?pageNum_tema=%d%s'', $currentPage, max(0, $pageNum_tema - 1), $queryString_tema); ?>''>Previous</a>
<?php } // Show if not first page ?> </td>
<td width=''23%'' align=''center''> <?php if ($pageNum_tema < $totalPages_tema) { // Show if not last page ?>
<a href=''<?php printf(''%s?pageNum_tema=%d%s'', $currentPage, min($totalPages_tema, $pageNum_tema + 1), $queryString_tema); ?>''>Next</a>
<?php } // Show if not last page ?> </td>
</tr>
</table>
</p>
<p>
</p>
</body>
</html>
<?php
mysql_free_result($tema);
mysql_free_result($counter);
?>
Aktív témák
- i5-13600KF, RX 9070, DDR5 32GB, 1 TB M.2, Fractal North TG és sok garancia
- Logitech Combo Touch iPad Pro 11" (1., 2. a 3. gen), szürke - UK billentyűzet ipad tok billentyűzet
- újszerű iPad Pro 11" (3. generációs) (2021) M1 chip Wi-Fi 128GB silver ezüst Apple
- szinte új iPhone 16 Pro Max 256GB desert titanium sivatagi titán független Apple 3 év garancia
- újszerű iPhone 16 Pro 256GB white titanium fehér titán iStyle független Apple 3 év garancia
- BESZÁMÍTÁS! ASUS A520M R5 5600X 16GB DDR4 512GB SSD RTX 3060Ti 8GB Rampage SHIVA Enermax 650W
- Samsung Galaxy A22 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- Huawei Nova Y70 128GB, Kártyafüggetlen, 1 Év Garanciával
- LG 65B4 - 65" OLED - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox Ready
- Telefon felvásárlás!! iPhone X/iPhone Xs/iPhone XR/iPhone Xs Max
Állásajánlatok
Cég: Liszt Ferenc Zeneművészeti Egyetem
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest