Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Scriptu irasymas

Parašė yeag· 2008 Lie. 7 22:07:14
#1

as dar visai zalias ir nemoku irasyt php-fusion saitui koki nors scripta o kaip rasau tai man eroras ir nk nerodo nu zodziu pasakykit kaip ideti scriptus kad veiktu

Parašė Gugiss· 2008 Lie. 7 22:07:50
#2

i paneles?

Parašė yeag· 2008 Lie. 7 23:07:30
#3

nu teisiog scriptai kad veiktu kaip irasyt tesiog pasakyk i panele bandiziau neveikia raso Parse error: syntax error, unexpected '<' in /usr/home/www1/ftp/nf/side_left.php(25) : eval()'d code on line 2\

parasykit geriau kaip irasyt nes pats nemoku gal netaip kaska darau nu ir panashei

Parašė Gugiss· 2008 Lie. 7 23:07:43
#4

dek cia skripta

Parašė yeag· 2008 Lie. 8 00:07:38
#5

turi gal skype ? jaigu turi tai parasyk tada paiskinsiu tau

Parašė Žmogus· 2008 Lie. 8 00:07:17
#6

Nieks tau to sumauto skype neduos, sakyk čia bėdas ir viskas

Parašė yeag· 2008 Lie. 8 00:07:33
#7

nu zodziu parasykit kaip irasyt koki scripta nes as nemoku ir viskas :|

Parašė Žmogus· 2008 Lie. 8 00:07:00
#8

openside("namas");
?>

scriptas tavo

<?
closeside();



Parašė yeag· 2008 Lie. 8 00:07:25
#9

tai vat man is iir neveikia kaip sukuriu panele dedu tarp situ scripta ir raso tipo Parse error: syntax error, unexpected '<' in /usr/home/www1/ftp/nf/side_left.php(25) : eval()'d code on line 2


O gal reik i ftp kaska det?

Parašė Gugiss· 2008 Lie. 8 00:07:34
#10

tai dek cia skripta

Parašė yeag· 2008 Lie. 8 00:07:23
#11

nu pvz as noriu va sita idet bet nzn kaip nu zodziu kaip sakau nejna

SERVER STATUS
<?php
print'<table width="150">';
$server = "127.0.0.1";
$portg = "7777";
$portl = "9014";
$timeout = "5";

if ($server and $port and $timeout) {
$game = @fsockopen("$server", $portg, $errno, $errstr, $timeout);
$login = @fsockopen("$server", $portl, $errno, $errstr, $timeout);
}
print'<tr><td align="center"><strong>Server Status</strong></td></tr>';
if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
else { print'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
if($game) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
else { print'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
print'</table>';
?>

ONLINE PLAYERS

<?php
//first you need to define db info
define('mySQL_hostname', '127.0.0.1'); //database IP
define('mySQL_database', 'Database'); //database name
define('mySQL_username', 'User'); //database user
define('mySQL_password', 'Pass'); //database password

//connects to mysql
$db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )
or die( 'Error connecting to mysql<br><br>'.mysql_error() );

//connects to Database
$db_select = mysql_select_db( mySQL_database, $db_link )
or die( 'Error connecting to Database<br><br>'.mysql_error() );

//selects desired table
$chars=mysql_query("SELECT * FROM characters");

//tells how much rows are there (will come helpfull with while loops)
$rows =mysql_numrows($characters);

$i=0;
$x=0;

//while $i is smaller than number of rows repeat the code
while ($i < $rows) {
$online=mysql_result($chars,$i,"online"); //looks into characters table, under column online(if player is online its "0" else "1"), at row $i
if ($online == 1) { $x++; } // if column online at row $i is "1", increase $x
$i++; //increase $i
}
print 'Online players:<em>'.$x.'<em>'; //prints out the $x number of players online
?>

Parašė Gugiss· 2008 Lie. 8 08:07:52
#12

Prašom,

Server status:
openside("name");
print'<table width="150">';
$server = "127.0.0.1";
$portg = "7777";
$portl = "9014";
$timeout = "5";

if ($server and $port and $timeout) {
$game = @fsockopen("$server", $portg, $errno, $errstr, $timeout);
$login = @fsockopen("$server", $portl, $errno, $errstr, $timeout);
}
print'<tr><td align="center"><strong>Server Status</strong></td></tr>';
if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
else { print'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
if($game) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
else { print'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
print'</table>';
closeside();




ONLINE PLAYERS:
openside("name");
   //first you need to define db info
  define('mySQL_hostname', '127.0.0.1');  //database IP
  define('mySQL_database', 'Database');  //database name
  define('mySQL_username', 'User');  //database user
  define('mySQL_password', 'Pass');  //database password

//connects to mysql
  $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )
    or die( 'Error connecting to mysql<br><br>'.mysql_error() );

//connects to Database
  $db_select = mysql_select_db( mySQL_database, $db_link )
    or die( 'Error connecting to Database<br><br>'.mysql_error() );

//selects desired table
   $chars=mysql_query("SELECT * FROM characters");

//tells how much rows are there (will come helpfull with while loops)
   $rows =mysql_numrows($characters);

   $i=0;
   $x=0;

//while $i is smaller than number of rows repeat the code
   while ($i < $rows) {
    $online=mysql_result($chars,$i,"online"); //looks into characters table, under column online(if player is online its "0" else "1"), at row $i
    if ($online == 1) { $x++; } // if column online at row $i is "1", increase $x
    $i++; //increase $i
    }
   print 'Online players:<em>'.$x.'<em>'; //prints out the $x number of players online
closeside();



Redagavo Gugiss· 2008 Lie. 9 08:07:56

Parašė yeag· 2008 Lie. 9 00:07:54
#13

man nejna uzdet ta scripta kur online players

Parašė MAnjack· 2008 Lie. 9 08:07:19
#14

Jeigu neveikia, tai dėl to, kad nėra characters lentelės.

Parašė Gugiss· 2008 Lie. 9 08:07:29
#15

Neina nes tikriausia neteisingai nurodyti mysql duomenys... nustatyk pagal save...

Parašė yeag· 2008 Lie. 9 16:07:08
#16

o kas per characters lentele ? o gal jus turite ji?

Parašė MAnjack· 2008 Lie. 9 18:07:18
#17

Nežaidžiam mes tokių žaidimų. Tavė scriptą, o apie lentelę niko nežino :|