Jump to content
php.lv forumi

Puika1

Reģistrētie lietotāji
  • Posts

    247
  • Joined

  • Last visited

Posts posted by Puika1

  1. laikam jūs visi esat redzējusi iekš php-fusion kad komentē piemēram jaunumus utt komentārus atdala ar svītrām kāds nezin kur man atrast (tieši kurā php failā) un kā uzlikt lai komentārs būtu pem pelēkā lodziņā ļoti ceru uz palīdzību

  2. es ieliku te bet nekas nemainijas

     

    echo "<table width=\"180\" cellpadding=\"0\" cellspacing=\"0\"><vertical-align: top;><td width=\"300\" lign=\"center\"><img src='http://www.planetamd64.com/style_images/amd64/user.png' alt='face' /><a href='forum/index.php?showuser=$users[id]' title='$users[members_display_name]'>$users[members_display_name]</a><br />";

  3. sveiki mazinu help man vaig kr4 man script rāda tā

    55750278.jpg

    Es gribētu šādi

    68056372.jpg

     

    reku ir tās rindas kods

     

      echo "<table width=\"180\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"300\" lign=\"center\"><img src='http://www.planetamd64.com/style_images/amd64/user.png' alt='face' /><a href='forum/index.php?showuser=$users[id]' title='$users[members_display_name]'>$users[members_display_name]</a><br />";

     

    2.kā tanī kodā ielikt lai lietotāja niks rādītos <br></br>

     

    Un ja ir iespēja kā uzlikt ka dažādām grupām cita bilde?

     

    rekur būs pats kods http://paste.php.lv/544c6bba570b4b22fc8014...94d1b2?lang=php

     

    Es ļoti ceru uz palīdzību

  4. man ir loti liela problema un es loti ludzu pec palidzibas tadad es apvienoju savu web ar ipbwi (ipb-website integration)

     

    registresanas kods ir sads http://paste.php.lv/1bfdd40bacff8a96f8fa40...19a8d4?lang=php

     

    2 problemas

     

    1.Kad repieregistrejas ,neregistre ka members bet ka Validating

    2.pieregistrejas viss ok bet foruma apaksa pie statistikas nerada ka ir registrejies (ši lielaka problema)

     

     

    HELP KAUTKā ATRISINāT šeit var apskatit darbiba

     

    uz pirmo es atradu problemu bet nesapratu kas tur jaraksta

     

    /**

    * @desc Creates a new account and returns the member ID for further processing.

    * @param string $userName Username

    * @param string $password In plain text. Will be encrypted with md5()

    * @param string $email Mail

    * @param array $customFields Optional values for the (existing) custom profile fields.

    * @param boolean $validate Whether to put the user in the validation group

    * @param string $displayName Display name

    * @return long New Member ID or false on failure

    * @author Jan Ecker <[email protected]>

    * @author Matthias Reuter

    * @author Pita <[email protected]>

    * @author Cow <[email protected]>

    * @sample

    * <code>

    * $ipbwi->member->create('name', 'password', '[email protected]');

    * $ipbwi->member->create('name', 'password', '[email protected]', array('1' => 'content of field1', '2' => 'content of field2'), true, 'displayname', true);

    * </code>

    * @since 2.0

    */

  5. kāds var man palīdzēt šis ir galerijas scripts viņš velk bildes ārā no htdoc kā var lai vilktu no piem htdoc/img (localhsot/img)

     

    <?
    //************************************************************//
    //															//
    //				PHP Slideshow v0.1						  //
    //				Author: Brian Mahler						//
    //				Copyright (c) 2006 Brian Mahler			 //
    //															//		  
    //************************************************************//
    //
    // CSS to position and change appearance
    // Modify these settings to change the appearance of the page
    //
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01//EN"
      "http://www.w3.org/TR/html4/strict.dtd">
    <html>
      <head>
      <title>PHP Slideshow v0.1 by Brian Mahler</title>
    	<style type="text/css">
    		body{
    			background-color:#eee;
    		}
    		a:link, a:active, a:visited{
    			text-decoration:none;
    			color: #000;	
    		}
    		a:hover{
    			color: #bbb;	
    		}
    		table#images{ /* Includes PageNav,ImageNav and Image */
    			margin:auto;
    		}
    		td#copy{
    			font-family: times;
    			font-size:8pt;
    		}
    		Table#nav{ /* Navigation table */
    
    		}
    		img#view{
    
    		}
    
    	</style>
    </head>
    <body>
    <?
    //Definitions
    //
    //To change the number of thumbnails on a page, simply change the number  below
    //
    define("PER_PAGE",8);
    
    
    //---------------------------------------------Do not Edit below this line-----------------------------------------------
    
    //Get the path to the current directory
    $z = split('/', $_SERVER['SCRIPT_FILENAME']);
    $thisname = $z[count($z)-1];
    $path = str_replace($thisname, '', $_SERVER['SCRIPT_FILENAME']);
    
    //Define allowed file extensions
    $allowed = array('jpg','gif','png');
    
    //Read through the directory and find all files with proper file extensions
    $dir = dir($path);
    while ($file = $dir->read()) {
    if (($file != '.') && ($file != 'CVS') && ($file != '..')) {
    	$file_size = filesize($path . $file);
    	$file_extension = file_ext($file);
    	if(!is_dir($path . $file) && isset($file_extension) && in_array($file_extension, $allowed)) {
    		$images[] = array('name' => $file,
    						  'size' => $file_size);
    	} 	
    }
    }
    
    //Check for images present in the directory
    $count = count($images);
    if ($count < 1){
    die('<center>No images present in current directory</center>');
    }
    
    //Calculate the number of pages
    $pages = ceil($count / PER_PAGE);
    
    //Get the current page
    $current_page = $_GET['page'];
    if (!isset($_GET['page'])){
    $current_page = 1;
    }
    
    //Page Navigation
    if ($current_page == 1) {
    	$next = $current_page + 1;
    $pagehtml = '<b>Page ' . $current_page . ' of ' . $pages . '</b> | <a class="navi" href="index.php?page=' . $next . '">Next Page ></a>';
    }elseif ($current_page == $pages){
    	$back = $current_page - 1;
    $pagehtml = '<a class="navi" href="index.php?page=' . $back . '">< Previous Page</a> | <b>Page '  . $current_page . ' of ' . $pages . '</b>';		 	
    }else{
    $next = $current_page + 1;
    $back = $current_page - 1;
    	$pagehtml = '<a class="navi" href="index.php?page=' . $back . '">< Previous Page</a> | <b>Page '  . $current_page . ' of ' . $pages . '</b> | <a class="navi" href="index.php?page=' . $next . '">Next Page ></a>';
    }
    
    
    //Build the thumbnail navigation table
    $y = $current_page * PER_PAGE;
    $start = $y - PER_PAGE + 1;
    $image_nav = '<table width="500px" id="nav"><tr>';
    for ($x=$start; $x<=$y; $x++){
    	if ($x <= $count){
     	$url = $images[$x -1]['name'];
    	$image_nav .= '<td align="center" valign="center" width="12.5%"><a href="index.php?page=' . $current_page . '&id=' . $x . '"><img src="' . $url . '" border="0" width="60px"></a></td>';
    
    }
    }
    $image_nav .= '</tr></table>';
    
    //The image to be shown
    $image_view = $_GET['id'];
    if (!isset($_GET['id'])){
    $image_view = $current_page * 8 - 7;
    }
    $image = '<img id="view" src="' . $images[$image_view - 1]['name'] . '" width="512px">'; 
    
    $copy = 'PHP Slideshow v0.1 ©2006 Brian Mahler';
    
    //Display the slideshow
    echo '<table id="images" width="500px" border="0" cellpadding="2px">';
    echo '<tr><td align="center">' . $pagehtml . '</td></tr><tr><td align="center">' . $image_nav . '</td></tr><tr><td id="pic" align="center" valign="center" style="padding:2px;">' . $image . '</td></tr>';
    echo '<tr><td id="copy" align="center">' . $copy . '</td></tr>';
    echo '</table>';
    
    //function to get file extension of files
    function file_ext($file) {
    $extension = split("[.]", $file);
    $ext_file = $extension[count($extension)-1];
    return strtolower($ext_file);
    }
    ?>
    </body>
    </html>

  6. beidzot man sanāca

     

    bet man rāda šitā

    1233513231.JPG

     

    kā var lai būtu apakšā

     

    scripts

    <a href="?id=1"><img src="kl.gif"/></a>
    <a href="?id=2"><img src="ts.gif"/></a>
    <a href="?id=3"><img src="ad.gif"/></a>
    <?php
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
    if ($id == 1)
    {
       include("lapa/1.php");
    }
    else if ($id == 2)
    {
       include("scr/serv.php");
    }
    else if ($id == 3)
    {
       include("scr/xxx.php");
    }
    else
    {
    	echo "ERROR, nepareizs id";
    }
    ?>

  7. kā es sapratu pēc tava teiktā izskatās tā

     

    <a href="?id=1"><img src="kl.gif"/></a>
    <a href="?id=2"><img src="ts.gif"/></a>
    <a href="?id=2"><img src="ad.gif"/></a>
    <?php
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
    if ($id == 1)
    {
    	"<?php include("kautkas"); ?>";
    }
    }elseif($id==3){
    	include("kautkas");
    {
       }elseif($id==3){
    	include("kautkas");
    }
    else if ($id == 3)
    {
     }elseif($id==3){
    	include("kautkas");;
    }
    else
    {
    	echo "ERROR, nepareizs id";
    }
    ?>

     

    bet nestrādā

    Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\cel.php on line 8

  8. piemēram

     

    <a href="?id=1"><img src="kl.gif"/></a>
    <a href="?id=2"><img src="ts.gif"/></a>
    <a href="?id=2"><img src="ad.gif"/></a>
    <?php
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
    if ($id == 1)
    {
    	echo "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
    }
    else if ($id == 2)
    {
    	echo "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj";
    }
    else if ($id == 3)
    {
    	echo "<?php include("kautkas"); ?>";
    }
    else
    {
    	echo "ERROR, nepareizs id";
    }
    ?>

     

    īstenība ko tur rādīt ja es teicu kad ielieku iekšā kko no php script vairs nestrādā

     

    piemēram šitas varians ko es tiko uzrakstiju ejot iekšā rāda eror

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\AppServ\www\cel.php on line 16

  9. <a href="?id=1"><img src="kl.gif"/></a>
    <a href="?id=2"><img src="ts.gif"/></a>
    <a href="?id=2"><img src="ad.gif"/></a>
    <?php
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1;
    if ($id == 1)
    {
    	echo "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
    }
    else if ($id == 2)
    {
    	echo "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj";
    }
    else if ($id == 3)
    {
    	echo "teksts, kad 3";
    }
    else
    {
    	echo "ERROR, nepareizs id";
    }
    ?>

  10. šāds scripts

     

    <?php
    $platums = "160"; // platums px
    $forums = ""; // foruma url
    $limits = "5"; // cik daudz jaunumi uzrādīsies
    $host = "localhost"; // db hosts
    $dbname = ""; // foruma datubaze
    $dbuser = "; // foruma db users
    $dbpass = ""; // juusu foruma datubaazes parole
    $link = mysql_connect($host, $dbuser, $dbpass)
    or die("NEsanaaca piekontektities: " . mysql_error());
    mysql_select_db($dbname) or die("Datubaaze neekstistee");
    mysql_query("SET NAMES UTF-8"); // lai rāda LV alfabētu
    
    // dabuunam datus no DB
    $kverisdivi = mysql_query("SELECT posts, last_poster_name, last_poster_id, title, tid, forum_id, last_post FROM ibf_topics ORDER BY last_post DESC LIMIT ".$limits."");
    echo "<div>";
    // izvadam jaunumus
    while($row = mysql_fetch_array( $kverisdivi )) {
     $datums = $row['start_date'];
     $piev_datums = date("d/m/Y : H:i:s",$datums);
    echo "<p><b>Topiks:</b> <a style='text-decoration: none' href=\"$forums/index.php?showtopic=".$row[tid]."&view=getnewpost\" title=\"\">".$row[title]."</a> | <strong>".$row[posts]."</strong><br>
    <b>Kas:</b> <a style='text-decoration: none' href=\"http://cs.1un2.lv/f/index.php?showuser=".$row[last_poster_id]."\" title=\"\">".$row[last_poster_name]."</a></p>";
    }
    echo "</div>";
    
    ?>

     

    kā es varu uztaisīt lai būtu tā

    1238094423.JPG

     

    lūdzu ja kāds zin pasakiet pliizz

×
×
  • Create New...