Jump to content

mazman13

Members
  • Posts

    156
  • Joined

  • Last visited

    Never

Posts posted by mazman13

  1. Does anyone know how to paginate a feed with MagpieRSS?

     

    Here is my code right now:

     

    $url = "http://www.michaelzavala.com/feed.xml";
    $rss = fetch_rss($url);
    $nb=1;
    foreach ($rss->items as $item ) {
    $title = $item[title];
    $guid  = $item[guid];
    $de = $item[description];
    $pubdate = $item[pubdate];
    echo "<p style=\"margin-bottom:0px;\"><strong><a href=\"$guid\">$title</a></strong><br /><span style=\"font-size:10px;color:#666666;\">$pubdate</span><br />$de</p>";
    	echo"<p style=\"margin-top:0px;margin-bottom:10px;\"><object type=\"application/x-shockwave-flash\" data=\"audio/player.swf\" id=\"audioplayer$nb\" width=\"290\" height=\"24\">
    		<param name=\"movie\" value=\"audio/player.swf\">
    		<param name=\"FlashVars\" value=\"playerID=$nb&bg=0xf8f8f8&leftbg=0x13619A&lefticon=0x000000&rightbg=0x000000&rightbghover=0x666666&righticon=0xffffff&righticonhover=0x000000&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&loop=no&autostart=no&soundFile=$guid\">
    		<param name=\"quality\" value=\"high\">
    
    		<param name=\"menu\" value=\"false\">
    		<param name=\"wmode\" value=\"transparent\">
    		</object><br /></p>";
    		$nb++;
    }
    

    There is a about 200 hundred or so of these, so I was trying to make it load faster.

     

  2. Ok. So I have alot of initial data that I need to put in a database.

    I really don't want to add everything line by line...

     

    I know there is a way to put everything into a text file and import it.

    What's the best way to do this? Can I just type what I need in notepad?

    Put a ',' for every break and a space for every line end?

     

    What query do I need for mySQL and where do I load the file 2?

    Thanks

  3. I'm looking for an offline Database program...(i guess kinda like access)

     

    But at the same time I would like it to be able to update or export to a mySQL database.

     

    I wanted to see if there was something (freeware) out there like that before I created some

    user interface so people at the company can update it. I'd rather not spend that time making that.

     

    Heck, it doesn't even have to store an offline database. It can just be online. But I'd like a program

    with a pretty clean interface so they can use it on thier desktop/client side.

  4. I'm looking for an offline Database program...(i guess kinda like access)

     

    But at the same time I would like it to be able to update or export to a mySQL database.

     

    I wanted to see if there was something (freeware) out there like that before I created some

    user interface so people at the company can update it. I'd rather not spend that time making that.

     

    Heck, it doesn't even have to store an offline database. It can just be online. But I'd like a program

    with a pretty clean interface so they can use it on thier desktop/client side.

     

     

  5. Lets say I have a section on my layout for a "headline" picture. 125 x 125

     

    And in my backend I can upload a news story with a picture or no picture.

     

    If I upload a picture, can I get CSS to resize it or crop it to fit in the 125 x 125 space...

    without it getting all warped?

     

    I'd rather have CSS do this than resize each image in photoshop if I want to upload something.

    What is the best way?

  6. I have three sites on the same server with different domains.

     

    I want to put a code on each site that I can activate from time to time with

    some kinda of special event banner. Something where I can make one or

    two changes somewhere and it go global.

     

    I was thinking something like this for the top of each webpage:

    <?php 
    include("../promo.php");
    ?>
    

     

    My promo.php page would be like this:

    <img src="somepromo.jpg" id="promo"/>
    

     

    And then on my CSS page it would be like this:

    #promo {
    width:760px;
    margin:0 auto;
    display:none; /* I can change this to block or something when I want the banner to display on the sites. Other wise it would just be none and the banner wouldn't effect the sites. */
    }
    

     

    Would something like that work? Or is there an easy way to do all of this?

     

  7. I do have one question...

     

    Where does this get called?:

     

    I went to the link to read about floats (thanks for that)

    but I don't know where this gets called in the HTML. Does it

    get called with the normal id="main"? I guess what I'm

    asking is, what is the purpose of the ":after"

     

    #main:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }

  8. I also have to note that my work monitor is 1024 x 768 resolution...I'm sure thats a problem.

     

    But there is no scroll bar or anything. And it just looks way off. My site is 760px...

     

    Any ideas? I should prob just move it all to the left huh?

  9. Well it looks very off centered on my work computer. It cuts off alot of the page.

     

    display.GIF

     

    If I try to center the image with "margin-left:auto" and "margin-right:auto" the top of the white

    background for the "body" of the page will be slightly off centered. So I need to make the text boxes below it line up so it all looks the same...if that makes any sense.

     

    Let me know if you guys have any ideas on what to do about this.

  10. I'm just now starting to use CSS for all areas of design (yeah, welcome to 2004)....

     

    But I have so many problems with layouts. I'm trying to use CSS instead of tables.

     

    Here is my site:

    http://michaelzavala.com/show/new/

     

    Here is my CSS:

    http://michaelzavala.com/show/new/include/style.css

     

    It looks ok now, but I know that something isn't right.

    I wanna figure it out now before I build the whole site around it.

     

    I have a computer at work that has a widescreen monitor, and the site looks way off.

     

    And when I try and edit this site in Dreamweaver 8.0 it looks like crap.

     

    No idea why all this is screwing up. If anyone can help me out that would be awesome.

    Thanks

  11. Anyone have any ideas why a form that I had set up just stopped sending mail?

     

    Could it be the server?

     

    It's going through mdwebhosting.com.au and using CPANEL.

     

    Here is the sample form

     

    
    $f_name = $_REQUEST['f_name'];
    $email = $_REQUEST['email'];
    $phone = $_REQUEST['phone'];
    
    if ($f_name == "")
    {
    $error = "Please enter your first name.";
    header("Location:contact_us.php?f_name=$f_name&email=$email&comm=$comm&phone=$phone&w_phone=$w_phone&m_phone=$m_phone&date=$date&fa_name=$fa_name&m_name=$m_name&address=$address&postcode=$postcode&gender=$gender&s_name=$s_name&suburb=$suburb&day=$day&month=$month&error=$error");
    exit();
    };
    if ($email == "")
    {
    $error = "Please enter your e-mail address.";
    header("Location:contact_us.php?f_name=$f_name&email=$email&comm=$comm&phone=$phone&w_phone=$w_phone&m_phone=$m_phone&date=$date&fa_name=$fa_name&m_name=$m_name&address=$address&postcode=$postcode&gender=$gender&s_name=$s_name&suburb=$suburb&day=$day&month=$month&error=$error");
    exit();
    };
    if (!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$",$email))
    {
    $error = "Please enter your e-mail in correct format<br><i>(i.e. yourname@domain.com)</i>.";
    header("Location:contact_us.php?f_name=$f_name&email=$email&comm=$comm&phone=$phone&w_phone=$w_phone&m_phone=$m_phone&date=$date&fa_name=$fa_name&m_name=$m_name&address=$address&postcode=$postcode&gender=$gender&s_name=$s_name&suburb=$suburb&day=$day&month=$month&error=$error");
    exit();
    };
    if ($phone == "")
    {
    $error = "Please enter your phone number.";
    header("Location:contact_us.php?f_name=$f_name&email=$email&comm=$comm&phone=$phone&w_phone=$w_phone&m_phone=$m_phone&date=$date&fa_name=$fa_name&m_name=$m_name&address=$address&postcode=$postcode&gender=$gender&s_name=$s_name&suburb=$suburb&day=$day&month=$month&error=$error");
    exit();
    
    }
    
    
    $message = "Name: $f_name $s_name \nAddress: $address\nSuburb: $suburb $postcode\nPhone: $phone\nE-mail: $email\nWork: $w_phone\nMobile: $m_phone\n\nGender: $gender\nDate of Birth: $day/$month/$date\nFather's Name: $fa_name\nMother's Name: $m_name\n\nComments or Questions:\n$comm";
    
    
    mail("michaelzavala@gmail.com", "Mad Athletes Mail", $message, "From: $f_name $s_name <$email>");
    header("Location:contact_us.php?sender=$f_name");	
    
    

  12. Well I tried to make those work, but they didn't seem to. Can you guys check to see if I'm missing anything?

     

    It's kinda long I know. Sorry.

    foreach($insurance_comp as $insurance)
    	{		
    
    	if($insurance != "Self"){
    	//Print name
    	echo"<font face=\"Arial\" size=\"3\"><strong>$insurance</strong></font>";
    
    	//Start table
    	echo"<table size=\"100%\"><tr><td>";
    
    	//Insurance total
    	$query = "SELECT COUNT(paysource) AS insur_total FROM data WHERE paysource='$insurance' AND date BETWEEN '$year-$month-00' AND '$year-$month-32'";
    $result = mysql_query($query)or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    extract($row);
    $i_total = ($insur_total * 2);
    
    //Get insurance handle
    echo"<font face=\"Arial\" size=\"1\"><strong>SATISFIED</strong></font></td>";		
    
    	$query = "SELECT COUNT(paysource) AS iinsurance FROM data WHERE insurance='Y' AND paysource='$insurance' AND date BETWEEN '$year-$month-00' AND '$year-$month-32'";
    $result = mysql_query($query)or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    extract($row);
    $i_insurance = number_format(($iinsurance * 100 / $insur_total),1)."%";
    
    echo"<td><img src=\"images/insurance.gif\">";
        $i = 1;
    while ($i <= $i_insurance) {
    echo"<img src=\"images/insurance.gif\">";   
    $i++;}
    echo" <font face=\"Arial\" size=\"2\"><strong>$i_insurance</strong></font>";
    echo"</td></tr>";
    
    echo"<tr><td>";
    
    ///////Get Additional/Returns
    echo"<font face=\"Arial\" size=\"1\"><strong>REFER</strong></font></td>";		
    
    $query = "SELECT COUNT(recommend) AS irefer FROM data WHERE additional='Y' AND paysource='$insurance' AND date BETWEEN 
    '$year-$month-00' AND '$year-$month-32'";
    $result = mysql_query($query)or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    extract($row);
    $i_refer = number_format(($irefer * 100 / $insur_total),1)."%";
    
    echo"<td><img src=\"images/insurance.gif\">";
        $i = 1;
    while ($i <= $i_refer) {
    echo"<img src=\"images/insurance.gif\">";   
    $i++;}
    echo" <font face=\"Arial\" size=\"2\"><strong>$i_refer</strong></font>";
    echo"</td></tr>";
    
    //Overall Average
    echo"<tr><td>";
    echo"<font face=\"Arial\" size=\"1\"><strong>OVERALL</strong></font></td>";		
    
    $new_insur_total = ($iinsurance + $irefer);
    $insur_overall = number_format(($new_insur_total * 100 / $i_total),1)."%";
    
    echo"<td><strong><font face=\"Arial\" size=\"2\">$insur_overall</font></strong></td></tr>";	
    
    
    echo"</table><br>";
    	}
    }
    

×
×
  • 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.