Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Posts posted by dreamwest

  1. By result??

     

    $query = "SELECT * FROM dyomails WHERE identity = '$SomeVar'";
    $results = mysql_query($query);
       if($line = mysql_fetch_assoc($results))
       {
       echo $line["email"] ;
       echo $line["logo"]."<br>";
    }

     

    By concat:

    $query = "SELECT * FROM dyomails WHERE identity = '$SomeVar'";
    $results = mysql_query($query);
       if($line = mysql_fetch_assoc($results))
       {
       $one .= $line["email"] ;
       $two .= $line["logo"];
    }
    
    echo $one;
    echo $two;

  2. I can get a single image to show up for all the videos, by using your way.

    This is what i have used up to now.

    but this is still not right.

     

    You just need to loop the xml results.

     

    If you look at this url feed:

    http://gdata.youtube.com/feeds/videos?vq=funny

     

    You will get the source, now just extract what you want with pregmatch:

     

    <media:thumbnail url="http://i.ytimg.com/vi/IytNBm8WA1c/2.jpg" height="90" width="120" time="00:03:54.500"/>

     

     

    $src = file_get_contents("http://gdata.youtube.com/feeds/videos?vq=funny");
    
    preg_match_all('~thumbnail url\s?=\s?[\'"](.*?).jpg[\'"]~is', $src, $match);
    
    foreach ($match[1] as $tmb) {
    
    echo "<img src='{$tmb}.jpg'  height='90' width='120'><br>";
    }
    

     

    Simple  ;)

  3. You wont need {literal} tags when using external style sheets only if you add the style directly

     

    <link rel="stylesheet" href="/style1.css" type="text/css" />
    

     

    Open your browser enter:

    http://localhost/SITE.COM/templates/template1/style1.css

     

    to see if the file actually exists, if it does youll include will work

  4. Direct css will need literal tags

     

    {literal}
    <style> {
       margin: 0;
       padding: 0;
    }
    body {
       font: normal 12px Arial, Helvetica, sans-serif;
       margin: 0;
       padding: 0;
    }</style>
    {/literal}

     

    Css can be called from an exteral file like youve shown but should contain the root command

     

    <link rel="stylesheet" href="/style.css" type="text/css" />

     

    Make sure you refreash the page and also check to see that $smarty->compile_check  is set to true  $smarty->compile_check = true; , this will force template rebuid

     

    also if i am using a jquery plugin i need to use a script tag to call the javascript files, how do i call these javascript file from index.tpl file

     

    Just use the {literal} javascript here{/literal}  tags

  5. $str = " Plain text plain text plain textplain textplain textplain text plain text  plain text plain text plain text.  Plain text plain text plain text
           plain text plain text plain text plain www.google.com/analytics text plain text plain text. Plain text  plain text plain text plain text plain text 
             plain text plain text
             plain text plain text plain text http://yahoo.com plain text plain text plain text plain text plain text plain text plain text plain text plain text
             plain text plain text.  Plain text  plain text plain text plain text https://www.example.com plain text plain text plain text plain text.
          "; 
    
    preg_match_all('~http://(.*?).com~is', $str, $matches);
    
    foreach ($matches[1] as $link) {
    
    echo "<a href = 'http://{$link}.com'>{$link}</a><br>";
    }

  6. HA! Youve got the comedic/sarcastic touch - I lov it!

     

    But its not just about generation theres a whole level to website speed

     

    Even if i could get your page generation time down from 0.019 seconds to 0.0019 seconds - that would  get me mentally randy :P

     

    We wouldnt just cover generation time but also ACTUAL finishing time it takes to download a page from  a website

  7. A external page time on ROIDS!

     

    $url = "http://youtube.com";
    
    $ch = curl_init($url); 
    $info = curl_getinfo($ch); 
    curl_close($ch);
    
    echo 'Took ' . $info['total_time'] . ' seconds to send a request";
    
    //Refrences///
    
        //* "filetime"
         //* "total_time"
        //* "namelookup_time"
        //* "connect_time"
        //* "pretransfer_time"
        //* "speed_download"
        //* "speed_upload"
        //* "starttransfer_time"
        //* "redirect_time"
    
    

  8. Actually its similar to connecting normally the loops are the same

     

    <table border=0 CELLPADDING=4>
    
    <tr>
    <td align=right>Alias</td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=2">Dust2Pub</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=3">Deathmatch</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=4">Deathrun</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=55">Jailbreak</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=5">KZ/Bhop</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=8">Freezetag</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=6">ZPlague</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=7">ZRevolution</a></td>
    </tr>
    
    
    <?php
    $con1 = mysql_connect("localhost", "quickgam_me", "xxxx") or die(mysql_error());
    mysql_select_db("quickgam_amx", $con1) or die(mysql_error());
    
    $con2 = mysql_connect("localhost", "user", "pass") or die(mysql_error());
    mysql_select_db("jailbreak", $con2) or die(mysql_error());
    
    $result  = mysql_query ("SELECT * from table ", $con1) or die(mysql_error());
    $result2  = mysql_query ("SELECT * from quickgam_jbamxbans", $con2) or die(mysql_error());
    
    ////////////////////////
    //Now pull anything you want out of $result2
    ////////////////////////
    
    
    $num = mysql_num_rows( $result );
    
    $query = "
    SELECT admin_id, server_id, nickname, hostname, access, ashow, admintype
      FROM amx_amxadmins a, amx_serverinfo s, amx_admins_servers c
    WHERE c.admin_id = a.id
       AND c.server_id = s.id
       AND a.id = c.admin_id
       AND a.admintype = a.admintype
       AND a.ashow = a.ashow
       ORDER BY a.admintype DESC, a.nickname ASC"; 
    $result = mysql_query($query, $con1) or die("CASE 1");
    while($row = mysql_fetch_array($result)){
    $nicks[$row['nickname']][]=$row['server_id']; 
    $admin[$row['nickname']]=$row['admintype'];
    }
    
    
    $color="1";
    foreach($nicks as $nickname=>$serverids)
    {
    if($color==1){
    $hello = implode(" ",$serverids);
    echo "<tr bgcolor='#FFF9A1'><td align=right><b>".$nickname."</b><br>"; 
    if($admin[$nickname]=="3"){
    echo "<i>Owner</i>";
    }elseif($admin[$nickname]=="2"){
    echo "<i>Head Admin</i>";
    }elseif($admin[$nickname]=="1"){
    echo "<i>Admin</i>";
    }elseif($admin[$nickname]=="0"){
    echo "<i>Co-Owner</i>";
    }
    echo "</td>";
    
    if(strstr($hello,"4") || strstr($hello,"6") || strstr($hello,"1") || strstr($hello,"8") || strstr($hello,"17") || strstr($hello,"2") || strstr($hello,"14") || strstr($hello,"5")){ // d2pub
       echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>";
       } else {
       echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>";
       }
    $color="2";
    } else {
    $hello = implode(" ",$serverids);
    echo "<tr bgcolor=''><td align=right><b>".$nickname."</b><br>"; 
    if($admin[$nickname]=="3"){
    echo "<i>Owner</i>";
    }elseif($admin[$nickname]=="2"){
    echo "<i>Head Admin</i>";
    }elseif($admin[$nickname]=="1"){
    echo "<i>Admin</i>";
    }elseif($admin[$nickname]=="0"){
    echo "<i>Co-Owner</i>";
    }
    
    echo "</td>";
    if(strstr($hello,"4") || strstr($hello,"6") || strstr($hello,"1") || strstr($hello,"8") || strstr($hello,"17") || strstr($hello,"2") || strstr($hello,"14") || strstr($hello,"5")){ 
       echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>";
       } else {
       echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>";
       }
       $color="1";
    }
    }
    
    
    ?>
    </tr>
    <tr>
    <td align=right>Alias</td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=2">Dust2Pub</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=3">Deathmatch</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=4">Deathrun</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=55">Jailbreak</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=5">KZ/Bhop</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=8">Freezetag</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=6">ZPlague</a></td>
    <td align=center><a href="http://xxxx/forumdisplay.php?f=7">ZRevolution</a></td>
    </tr>
    
    </table>

  9. Youll need a second connection:

     

    $con1 = mysql_connect("localhost", "user", "pass") or die(mysql_error());
    mysql_select_db("dbname", $con1) or die(mysql_error());
    
    $con2 = mysql_connect("localhost", "user", "pass") or die(mysql_error());
    mysql_select_db("dbname", $con2) or die(mysql_error());
    
    $result  = mysql_query ("SELECT * from table ", $con1) or die(mysql_error());
    $num = mysql_num_rows( $result );
    
    //etc etc....
    
    

     

     

  10. You can cut down half your code like this

     

    if(strstr($hello,"4") || strstr($hello,"1") etc....){ // d2pub
       echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>";
       } else {
       echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>";
       }

     

    You just repeating the same code...Remember :

     

    less code = Happiness

     

    You almost have correct code for a join , Im assuming these are seperate tables:

     

    FROM amx_amxadmins as a, amx_serverinfo as s, amx_admins_servers as c

  11. $1, $2, $3 etc.. relates to the position of the rewrite:

     

    RewriteRule ^test/(.*)/(.*)/(.*) test.php?id=$1&next=$2&test=$3  [L,QSA]

     

    So logically it would look like:

     

    RewriteRule ^test/$1/$2/$3

     

    Also you can swich them around anyway you want:

     

    RewriteRule ^test/$3/$1/$2

     

    Second,

    I want to cover the real path:

    http://www.domain.com/downloads/test/test_secret_09.php?file= and mask it with: http://www.domain.com/files/downloads/09

    ---

    So far, I have this:

     

    RewriteRule ^files/downloads/(.*) downloads/test/test_secret_$1.php?file=  [L,QSA]

     

    Your better of having the download script like this:

     

    RewriteRule ^files/downloads/(.*) downloads.php?id=$1  [L,QSA]

  12. Ive tried for ages to get playstation emulator working but it never seems to do anything.

     

    NES, SNES and N64 are a piece of cake compared to Playstation.

     

    Has anyone had any luck with this??

     

    I want to defeat my greatest gaming nemesis ........ Alundra

  13. <?php
    if ($pass != $info['password'])
    { header('Location: /login.php');
    }
    
    else
    {
    
    print "<object codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' id='doc_804151193636402' name='doc_804151193636402' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' align='middle'   height='500' width='100%' >";
    print "<param name='movie' value='./flash/book.swf'>";       
    print "<param name='quality' value='high'>";       
    print "<param name='play' value='true'>";      
    print "<param name='loop' value='true'>";       
    print "<param name='scale' value='showall'>";      
    print "<param name='wmode' value='opaque'>";       
    print "<param name='devicefont' value='false'>";      
    print "<param name='bgcolor' value='#ffffff'>";       
    print "<param name='menu' value='true'>";      
    print "<param name='allowFullScreen' value='true'>";       
    print "<param name='allowScriptAccess' value='always'>";       
    print "<param name='salign' value=''>";            
    print "<embed src='./flash/book.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' play='true' loop='true' scale='showall' wmode='opaque' devicefont='false' bgcolor='#ffffff' name='doc_804151193636402_object' menu='true' allowfullscreen='true' allowscriptaccess='always' salign='' type='application/x-shockwave-flash' align='middle'  height='650' width='100%'>";
    print '</embed>';   
    print '</object>';
    
    echo '<a href=logout.php>Logout</a>';
    }
    }
    }
    ?>
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.