Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Need Help !

Parašė robert· 2008 Geg. 10 23:05:36
#1

Tai vat, as noriu kad pas mane webe vietoj sitos eilutes rodytu Kiek Dabar zmoniu online. tik nezinaukiap taip padaryti :)
Screen

Theme.ph failas

<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";

// theme settings
$body_text = "#3B3A41";
$body_bg = "#5C5C5C";
$theme_width = "62%"; // daily theme plotis procentais arba pixeliais
$theme_width_l = "175";
$theme_width_r = "175";

function render_header($header_content) {

global $theme_width,$settings;

echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width'>
<tr>
<td align='left' class='header'>
<img src='".THEME."logo.png' border='0'>
</td>
</tr>
</table>";

echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='outer-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='sub-header' valign='middle'>".showsublinks("","white")."</td>
</tr>
<tr>
<td class='body_top' align='center'>
<table class='ads'>
<tr>
<td><img src='".THEME."images/ads.png'></td>
<td><img src='".stripslashes($settings['description'])."'></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class='title'>".$settings['sitename']."</td></td>
</tr>
</table>\n";


echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";

}

function render_footer($license=false) {

global $theme_width,$settings;

echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left' class='footer-left'><a href='' target='_blank'>PHP-Fusion</a> | 2008 Mpower</td>
<td align='right' class='footer-right'><img src='".THEME."images/made_by.png'>&nbsp;&nbsp;<a href='http://emotive.in' target='_blank'><img src='".THEME."images/emotive.png' border='0'></a></td>
</td>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";

}

function render_news($subject, $news, $info) {

global $aidlink,$item_type;
$res = "";

echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>$news</td>
</tr>
<tr>
<form name='editnews".$info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$info['news_id']."'>
<td class='news-footer'>Para&#1088;&#1083; - <a href='profile.php?lookup=".$info['user_id']."' style='color:#8C8B8F;'>".$info['user_name']."</a> | <a href='news.php?readmore=".$info['news_id']."' style='color:#8C8B8F;'>Pla&#1080;iau!</a> ";
    if (iADMIN && checkrights(N)) {
echo "| <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$info['news_id'].".submit();' style='color:#8C8B8F;'>Redaguoti</a>";
}

echo "</td>
</form>
</tr>
</table>\n";

}

function render_article($subject, $article, $info) {

global $aidlink,$item_type;
$res = "";
   
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<form name='editarticle".$item_id."' method='post' action='".ADMIN."articles.php".$aidlink."&amp;article_id=".$item_id."'>
<td class='news-footer'>Para&#1088;&#1083; - <a href='profile.php?lookup=".$info['user_id']."' style='color:#8C8B8F;'>".$info['user_name']."</a> | <a href='print.php?type=A&amp;item_id=".$info['article_id']."' style='color:#8C8B8F;'>Spausdinti</a> ";
    if (iADMIN && checkrights(A)) {
echo "| <input type='hidden' name='edit' value='edit'><a href='javascript:document.editarticle".$info['articles_id'].".submit();' style='color:#8C8B8F;'>Redaguoti</a>";
}

echo "</td>
</form>
</tr>
</table>\n";

}

function opentable($title) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";

}

function closetable() {

echo "</td>
</tr>
</table>\n";

}

function openside($title) {
   
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
</tr>
<tr>
<td class='side-body'>\n";

}

function closeside() {

echo "</td>
</tr>
</table>\n";
tablebreak();

}

function opensidex($title,$state="on") {

$boxname = str_replace(" ", "", $title);
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";

}

function closesidex() {

echo "</div>
</td>
</tr>
</table>\n";
tablebreak();

}

function tablebreak() {

echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td height='5'></td>\n</tr>\n</table>\n";

}
?>




Parašė Creatium· 2008 Geg. 11 00:05:02
#2

Gal sita reik pasalinti

<tr>
<td class='sub-header' valign='middle'>".showsublinks("","white")."</td>
</tr>





Parašė robert· 2008 Geg. 11 00:05:44
#3

O ka idet kad rodytu online? ?|

Parašė Creatium· 2008 Geg. 11 00:05:32
#4

Online, tai kiek prisijungusiu ar kiek uzsiregistravusiu?

Parašė robert· 2008 Geg. 11 00:05:52
#5

Kiek prisijungusiu

Parašė Creatium· 2008 Geg. 11 00:05:08
#6

Ojoj pasimeciau kode.. :D. Gal kas kitas dabar pades. As nebent ryt ryte parasysiu.

Parašė robert· 2008 Geg. 11 09:05:52
#7

Tai gal šiandien kas nors padės? :?

Parašė bad_user· 2008 Geg. 11 10:05:25
#8

Nerandu savo skriptų bibliotekoje kur skaičiuoja online :)

Parašė robert· 2008 Geg. 11 10:05:50
#9

Paaieskok , gal rasi, jeigu padesi busiu labai DEKINGAS :) ;);)
P.S. Sita kaip nors galima butu iterpti? https://webdnd.com/infusions/cod...code_id=73

Redagavo robert· 2008 Geg. 11 11:05:31

Parašė Creatium· 2008 Geg. 11 11:05:59
#10

Viskas imanoma ;)

Parašė bad_user· 2008 Geg. 11 11:05:53
#11

Atlyk šia funkciją:

<?php
mysql_pconnect($db_server, $db_username, $db_password);
mysql_select_db($db_database);
$str_1 = "
CREATE TABLE vartotoju (
laikas int(15) DEFAULT '0' NOT NULL,
ip varchar(40) NOT NULL,
file varchar(100) NOT NULL,
PRIMARY KEY (laikas),
KEY ip (ip),
KEY file (file))";
mysql_query($str_1) or die("Klaida");?>





Tada šitą:


<tr>
<td class='sub-header' valign='middle'>".showsublinks("","white")."</td>
</tr>




Keiti į šitą:


$taimautas_sekundem = 300; //kas kiek laiko tikrins
$laikas = time(); //dabartinis laikas
$timeout = $laikas-$taimautas_sekundem; //tikrinimas

mysql_pconnect($db_server, $db_username, $db_password);
mysql_select_db($db_database);

$insert = mysql_db_query($db_database, "INSERT INTO vartotoju VALUES
('$laikas','$REMOTE_ADDR','$PHP_SELF')");
$delete = mysql_db_query($db_database, "DELETE FROM vartotoju WHERE laikas<$timeout");

$result = mysql_db_query($db_database, "SELECT DISTINCT ip FROM vartotoju WHERE file='$PHP_SELF'"); //skaičiuojam unikalius ip


$vartotojai = mysql_num_rows($result);
<tr>
<td class='sub-header' valign='middle'>Dabar naršo:<b> $vartotojai </b></td>
</tr>



Redagavo bad_user· 2008 Geg. 11 11:05:04

Parašė robert· 2008 Geg. 11 12:05:09
#12

Aciu SoNG