Dynamic Website

Hi Guys,
I have created my dynamic website and it works alright, but I need assistant with orginization of my files.
I have putting together an on-line store for products such as jeans.  My SQL data based is designed as follow:   categories (denim, non denim) body ( boot cut, flare, skinny and etc), style ( style number, description and 4 photos for each style)  These photos are listed in PHP with a  specific number assigned to them like st001.jpg . In Dreamweaver I linked image folder to the area where the photos are to be repeated all the way down the page for each style
I will have over 500 SKU ( style Number) each SKU will have 4 photos. How would I be able to organize all these photos in folders?
I found the reapeating region easy andI am planning to use my data base and use the repeat region method to list all the style number.  Do I put 2000 puts in a Image folder, or do I create a main image folder and add sub-folder for each body such as skinny, boot cut, flare and etc.  I also need to fiter these styles based on wash, rise, body and etc. if that make sense.
Please help me with the correct  and easy method to do this task.
I also would like the shopper to be able to magnify on the photo.  I am using the "thickbox widget" for my gallery. Please tell me if this is the correct way or suggest if there is better method.
Thank you so much and everyone have a happy holiday.

bobbak2011 wrote:
Well I need a specific look for my website for high end designer clothing. Most shopping bag software I came a cross were really basic.  If there are shopping bags that have good datbase features available i would like to link them in dreamweaver to my website.
Of course, i would not put all the photos and for each style on one page.  They will be displayed in different pages with filtering capabilities built in to the each page.
Look should be the least of the concerns.  Most pre-built apps can be skinned to match your site.
I am attaching an image to this post to describe details below.  It is of a wireframe of your database structure (images are easier to talk with then text in many cases).
As you describe it you have 4 tables right now and you are trying to organize images.  The 4 tables you describe having now are:
Products - Contains product data, pricing, and subcategory information
Categories - Denim, etc.
Body - Boot cut, etc.
Style - Style number, etc.
In the diagram you will see text in 2 colors, red and blue.  The Blue text columns are your primary keys and the Red are where foreign keys should lie.  Because there are foreign keys the tables should be setup with the InnoDB engine as opposed to the default myisam.  The foreign keys create the proper dependancies to ensure the integrity of the data so that all fields entered in are valid (this will help a lot with updating down the road).
Next, is your images.  The table 5 is a very basic depiction of what your images table should look like.  At the very least you need to know the path, alt_tag (in case image doesn't load and to make page valid), and a foreign key on the product_id column linking to your products table.  To make things easier on your script you should have all the images in one folder.  The database will do the heavy lifting to sort the pictures to the proper items.  And because you have multiple images for each product you have an "Order_By" column to that table as well to ensure that they are printed in the proper order.
Lastly is the query.  Your query should have the LIMIT and utilize the "offset" to select the specific rows within that range.  More info on the offset can be found here ( http://dev.mysql.com/doc/refman/5.0/en/select.html ).  The page listing query will select the first image for each product and basic information.  Then run a loop to print X number of items to the screen.  Then for your product detail page gather all the data from the multiple tables and you should be good to go.
That should get you started.  If you have any questions post back.

Similar Messages

  • Help with building dynamic website using tutorial (was: I know this is a repost but I'm still stuck!)

    Perhaps this was missed by the group but here goes:
    I am slogging thru a dynamic PHP tutorial but  I cant continue without losing some understanding of the process due to ?
    I am trying to complete the following:
    Building your first dynamic website – Part 2: Developing the back end
    However,
    my Insert record form dialog (below) looks like this, and I need to change both 'title' and 'blog_entry' values (as shown above), but I cannot make that choice in my form.
    I am using DW CC with the Deprecated Server Behavior from DMX zone.
    I have made sure my results match the tutorial, but I cant get past the above inconsistency in functionality.
    Any help would be appreciated.
    Thanks folks!

    The Columns area indicates which form field is used to insert a value in each column. Although the post_id and updated columns are listed as getting no value, their values are generated automatically by the database.
    Check that the title and blog_entry columns are being assigned the correct values. If either is marked as getting no value, it means that you have spelled the names of the form fields differently from the column names. Correct this by selecting the column name in the Columns area and selecting the form field's name from the Value pop-up menu.
    Nancy O.

  • How I detect in a dynamic website either PHP or CFM or JSP that cookies & javascript are enabled ?

    How I detect in a dynamic website either PHP or CFM or JSP that cookies & javascript are enabled ?

    You do that on the browser end using JavaScript. For cookies, simply establish session variables in PHP or whatever you use. if the browser refuses them, they wil lreturn a respective value in the referrers...
    Mylenium

  • Dynamic website advice needed

    Hi, I need a program that has an easy interface for a
    non-programmer. The
    client is a staffing agency and needs to update the available
    jobs on a
    daily basis. Right now they are using 8 year old software
    called Web Data. I
    would like the program to integrate with DW8 and be easy to
    install.
    Thanks, Ron

    Ron wrote:
    > Hi, I need a program that has an easy interface for a
    non-programmer. The
    > client is a staffing agency and needs to update the
    available jobs on a
    > daily basis. Right now they are using 8 year old
    software called Web Data. I
    > would like the program to integrate with DW8 and be easy
    to install.
    >
    > Thanks, Ron
    You would build a dynamic website with DW that gives your
    client access
    to a secure area where they can add jobs.
    Do you know any serverside languages? If you do, DW can help
    you out, if
    not, then you either need to do some learning, or pay someone
    else do
    this one.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • I need to know how I will create a dynamic website using php and mysql

    I need to know how will I create a dynamic website using php and mysql that people could have the abilities of registering in the website, and modify their profile where they can add their pictures and everything. apart from that, they should have the ability to search about other member. hope to here more from you.

    If you are a right-brained creative, and have no previous experience or propensity to be able to understand coding and database "stuff", and/or if your time can be better spent on other skills, I recommend you save your sanity and hire a developer... or at least the first time around. I have been attempting to grasp this for years... and have a library of marked up books to prove my efforts, all while trying to keep up with an ongoing client base that is always cramped. It's a wonder I still have my sanity... then again, I might not be the best person to determine that. Others might question it.
    That said, I still plan to master php... one of these days.

  • Stuck in first dynamic website tutorial

    I am going through first dynamic website tutorial, I am having difficulties with: Create a MySQL connection.  I get an error message when I hit the test button, I get error 1045, access denied for user 'phptestuser@localhost' (using password: yes).  I have tried all the mentioned suggestions.  Any help would be appreciated.  My email is [email protected]

    Javascript errors can be a pain sometimes.
    These seem to occur quite frequently when applying behaviours but I can't remember the exact answer, maybe someone else will help out - it involves deleting a file in Dreamwear to try and clear the issue.
    I had the same problem a few months back and nothing seems to work then suddenly it just went away.
    You can try copying the code to a new Dreamweaver file and see if that has any effect OR try a clean file and rebuild. I found that for some reason when a file becomes corrupt no matter what you seem to do nothing works other than to start afresh.

  • Dynamic website with Flash?

    I'm using Dreamweaver 8 building a coldfusion website. The
    content for
    the webpages are pulled from an MS Access database. I'm
    trying to add
    in a flash photo gallery to a few of the pages. If I put the
    flash
    code directly on the webpage it will dispaly the flash photo
    gallery.
    However, if I put that same code into the database and
    display it
    dynamically it will not display the flash photo gallery. I
    have
    checked the source code of the dynamic page after it has
    loaded and
    the code is there.
    I'm sure the problem has something to do with the slight
    delay it
    takes for the code to be pulled from the database. Does
    anyone know of
    a fix for this?
    The html for both the static and dynamic page look exactly
    the same if
    you view the source code after the page has loaded. any help
    is
    GREATLY appreciated, thanks!
    here is a chunk of the flash code that is being inserted:
    <td width="492">
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://fpdownload.macromedia.com/pub/
    shockwave/cabs/flash/
    swflash.cab#version=8,0,0,0','width','474','height','454','id','CoffeeCup','align','right' ,'src','finaltemplateCoffee','quality','high','bgcolor','#ffffff','name','CoffeeCup','scal e','noscale','salign','lt','pluginspage','
    http://
    www.macromedia.com/go/getflashplayer','movie','finaltemplateCoffee'
    ); //end AC code
    </script><noscript><object
    classid="clsid:d27cdb6e-
    ae6d-11cf-96b8-444553540000"
    codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
    swflash.cab#version=8,0,0,0"
    width="474" height="454" id="CoffeeCup" align="right">
    <param name="movie" value="finaltemplateCoffee.swf"/>
    <param name="quality" value="high" />
    <param name="scale" value="noscale" />
    <param name="salign" value="lt" />
    <param name="bgcolor" value="#ffffff" />
    <embed src="finaltemplateCoffee.swf" quality="high"
    bgcolor="#ffffff"
    width="474" height="454"
    name="CoffeeCup" scale="noscale" salign="lt" align="right"
    type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    /></
    object></noscript>
    </td></tr>

    Usually the best source of information on working with a
    template is from the site where you purchased the template. There
    may be supplimental information packaged with the downloaded files,
    or there may be comments written directly into the files
    themselves.
    Exactly how you modify the file will depend on how it was
    designed, what version of Actionscript was used, whether it uses a
    component, or an swc file, and how well it was created.

  • How to upload a dynamic website?

    Hi All,
    I have made a project on Netbeans 6.1 using JSF architecture and Apache Tom Cat 6.0.14. The database is Microsoft Sequel Server 2005. I want to host it on a website. I am prepared to purchase web space for web hosting.
    What features should be available in the web hosting package? Is there any good company that provides it? This is the first time I am doing it. I have a rough idea that the .war file of the project is required. What files should be added on the web space that enables proper functioning? Any tutorial or references are welcome.
    Thanks
    Best Regards

    1) You need to Buy Java Web Package.
    2) Find Out Hosting Operating System ( Windows /Unix....)
    3) Find out with the seller Which Webserver they are providing to you ( Jboss , Tomcat , Glassfish...)
    4) Find out which DB they are providing to you
    5) Based these parameters you need to change your developed projects if required other wise you can directly deploy
    Regards
    Vijay

  • Building the site structure for a dynamic website with JSF

    Hi,
    I am still a JSF-beginner.
    I try to build a fully-functional base-demo-application with a fix and a dynamic part.
    Fix part for menu, dynamic part for site-content.
    At the moment, the JSF-hyperlinks of the main menu work, but any JSF-parts in the included documents of the dynamic part are not shown. I guess, this is dued to inclusion of subviews, but I cannot find any similar examples in the web to come one step further.
    Here my complete demo:
    faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>site1</from-outcome>
    <to-view-id>/site1.jsp</to-view-id>
    <redirect>
    </redirect>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>site2</from-outcome>
    <to-view-id>/site2.jsp</to-view-id>
    <redirect>
    </redirect>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    index.jsp:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <% response.sendRedirect("/jsfportal/site1.jsf"); %>
    site1.jsp:
    <?xml version="1.0" encoding="UTF-8" ?>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <% String site = "1"; %>
    <%@ include file="base.jsp" %>
    dynamic_site1.jsp:
    <h1>Welcome to site 1</h1>
    Have fun visiting our portal
    site2.jsp:
    <?xml version="1.0" encoding="UTF-8" ?>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <% String site = "2"; %>
    <%@ include file="base.jsp" %>
    dynamic_site2.jsp:
    <h1>Welcome to site 2</h2>
    Go to site 1: *<!-- And this is the JSF-link that is NOT shown: -->*
    <f:view>
    <h:form>
    <h:panelGrid border="0" columns="0">
    <h:commandLink id="p1" action="site1" value="Site 1" />
    </h:panelGrid>
    </h:form>
    </f:view>
    base.jsp:
    <%@ page language="java" %>
    <%@ page import = "java.io.*" %>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%
    String title = "";
    int siteInteger = 0;
    String dynamic_site = "";
    if ( site != null )
    if (
    ( site.length ( ) > 0 )
    ( site.length ( ) <= 30 )
    if ( isNumeric ( site ) )
    siteInteger = Integer.valueOf ( site ).intValue ( );
    switch ( siteInteger )
    case 2: title = "Site 2";
    dynamic_site = "dynamic_site2.jsp";
    break;
    default:
    title = "Site 1";
    dynamic_site = "dynamic_site1.jsp"; // Start page
    %>
    <html xmlns="http://www.w3.org/1999/xhtml"
    lang="de" xml:lang="de">
    <head>
    <title>
    <%= title %>
    </title>
    <meta name="description" content="test site" />
    <meta name="keywords" content="test site" />
    </head>
    <body>
    <div width="100%" style="text-align:left">
    <table width="970" border="0" cellspacing="0" cellpadding="0" style="background-color:#ffffaa;margin-top:25px;">
    *<!-- this is not good style putting CSS directly into HTML but it is a demo now ;) -->*
    <colgroup>
    <col width="970" />
    </colgroup>
    <tr>
    <td valign="top" align="left" style="padding:25px;">
    +<h1>+
    JSF portal
    +</h1>+
    </td>
    </tr>
    </table>
    <table width="970" border="2" cellspacing="0" cellpadding="0" style="background-color:#f5f5f0">
    <colgroup>
    <col width="270" />
    <col width="700" />
    </colgroup>
    <tr>
    <td valign="top" align="left" style="padding:25px; padding-left:40px;padding-bottom:320px;">
    <f:view>
    <h:form>
    <h:panelGrid border="0" columns="0">
    <h:commandLink id="p1" action="site1" value="Site 1" />
    <h:commandLink id="p2" action="site2" value="Site 2" />
    </h:panelGrid>
    </h:form>
    </f:view>
    </td>
    <td valign="top" align="justify" class="haupttext" style="padding:24px;">
    <p align="justify">
    <f:subview id="subview1">
    <jsp:include page="<%= dynamic_site %>" flush="true">
    <jsp:param name="" value="" />
    </jsp:include>
    </f:subview>
    </p>
    </td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    <%!
    public boolean isNumeric ( String myInput )
    if (myInput == null || myInput.length() < 1)
    return false;
    int start = 0;
    if (myInput.charAt(0) == '-')
    start = 1;
    for(int i = start; i < myInput.length(); i++)
    if (!Character.isDigit(myInput.charAt(i)))
    return false;
    return true;
    %>
    Who can name me that code positions responsible for that the JSF link in the dynamic part is not shown?
    It is not that it does not work it is not shown. The JSF tree seems to be cut because of wrong use of view and subview etc.
    (To put view tags in site1.jsp and site2.jsp does not help.)
    (Once having afforded an example it should go... (*Then* with JSTL, external CSS, etc. ;) )
    Dynamical site structure with include files is the big problem at the moment.)
    bye, Maik

    I found your following suggestions for such cases (seems you are the only profound JSF freak in the world...? :-) )
    Switch between subviews in one main page
    http://balusc.blogspot.com/2007/01/dynamic-jsf-subviews.html
    But the main problem for me is that I never find complete examples, but always fragments and it would be important for a beginner to have at least once a complete JSF example over a few subviews, especially here where it is very easy to corrupt the internal tree.
    (Some examples use the subview tags in the calling JSP, some in the called e.g.... Does not matter where to put it? Some use verbatim tags for HTML code outside JSF, some don't... and so on)
    Can anyone give me an URL for a complete example of a JSF site (with all files as possible, I am not very patient, too, but in this case it makes sense to have it entire ;-) ) with dynamic switches of subviews as preferentially used for bigger portal sites?

  • Application Request Routing (ARR) Dynamic Website Load

    I currently have a Cloud Project which contains a web role and a work role, with 2 instances of each.
    I have multiple domains which point to the same website and the code uses the domain as an identifier to then load up a website with customised content relevant to that domain.
    I would like to go a step further and add a second web role and then be able to be able to choose which website/web role to load that domain. I'd also like to use the database or a cached file to determine which website to load
    rather than to hard code it in a web config. This idea would be that I could flick a switch and a different site would be loaded.
    I thought that this might be possible with the ARR. 
    Does this sound like it is possible to do and any hints on the direction to take?
    Thanks in advance.

    Hi GBSM,
    Thanks for your posting!
    Base on my understanding, I guess you want to redirect the specify webrole before the site load. But base on my experience, if you want to redirect to another web role, you need use your domain name and port number, like this :http://www.domainname.com:8080.
    So I think you use the "http://www.domainname.com" to access your cloud service, you could visit the default site whose port number is 80. For your requirement, I think you can write your logic code
    into gloable. asmx page in your default webrole . When the condition meet your requirement, the site redirect to other web role. Also, you could store your conditions into database or cache.
    Another approach is as Benjamin's said, you can use URl Rewrite Map(http://www.iis.net/learn/extensions/url-rewrite-module/using-rewrite-maps-in-url-rewrite-module
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Developing dynamic website

    I am working on building a website with full applications for
    people to network online.
    I want the site to take the format of www.hi5.com or
    www.myspace.com.
    Can you please help me to know how best to go about buiding
    this using dreamweaver and interact extension.
    Thanks

    On Tue, 16 Jan 2007 10:00:16 +0000 (UTC), "urmy"
    <[email protected]> wrote:
    >I am working on building a website with full applications
    for people to network
    >online.
    >
    > I want the site to take the format of www.hi5.com or
    www.myspace.com.
    >
    > Can you please help me to know how best to go about
    buiding this using
    >dreamweaver and interact extension.
    What server-side scripting langauage do you work with?
    Whichever it is
    you need to be quite proficient in it (as well as html, css
    and
    javascript) before attempting something like those sites.
    Extensions should aid development not subsitute for lack of
    knowledge.
    Steve
    steve at flyingtigerwebdesign dot com

  • Updating Dynamic website with CSV database

    I have a question. I am very new to dynamic sites. I am
    working in dreamweaver, navicat, mysql and coldfusion to create a
    site that reads from a csv database. My question is this:
    The csv file is updated daily to reflect changes in
    inventory. Again, be gentle because I am very new at this, and our
    company cannot afford to bring in someone who can speed through
    this. Is there a way for me to design the front end and back end so
    that all I need to do to update the site is replace the information
    in the database from the new CSV file to reflect the updates in the
    inventory. I don't want to touch the front end. I want to have
    fields in the database that link to the images.
    Is this possible?

    >
    > The csv file is updated daily to reflect changes in
    inventory.
    > Again, be gentle because I am very new at this, and our
    company
    > cannot afford to bring in someone who can speed through
    this.
    Cannot afford or will not afford? This is a tremendous
    difference.
    Is
    > there a way for me to design the front end and back end
    so that all I
    > need to do to update the site is replace the information
    in the
    > database from the new CSV file to reflect the updates in
    the
    > inventory.
    What platform?
    When you say database do you mean the csv file?
    Many databases (Access, Mysql, MSSQL) you can import csv
    files and
    depending the the options your hosting co provides, it can be
    very easy
    to somewhat agravating.

  • Dynamic website indexable by search engine

    Hi<
    i was looking on the web and apparently I can make my dynamic
    webpages indexable by search engine spiders by using a "/"
    character instead of the standard "?" when passing a URL Query
    String. I am using Coldfusion MX7. I do not know where to
    reconfigure this, can anyone help? My email address is
    [email protected]
    Thanks
    Senator

    Search Engine Safe URL's - theres an article over on
    CommunityMX you could
    use to do this.
    http://www.communitymx.com/abstract.cfm?cid=7BFFE
    Brendon
    "howonearthdidigetin" <[email protected]>
    wrote in message
    news:eoc8t8$11h$[email protected]..
    > Hi<
    >
    > i was looking on the web and apparently I can make my
    dynamic webpages
    > indexable by search engine spiders by using a "/"
    character instead of the
    > standard "?" when passing a URL Query String. I am using
    Coldfusion MX7.
    > I do
    > not know where to reconfigure this, can anyone help? My
    email address is
    > [email protected]
    >
    > Thanks
    >
    > Senator
    >

  • Which php in built functions i need to learn to make dynamic websites like fb, u tube, etc.?

    threre are over thousand php functions...so its impossible to learn all of them......can anyonne tell which functions should i learn ....or gve me a link to a website.... or pdf....smethng like that??? plz ...thank you....:)...

    There is no fast track to learning enough PHP to know everything you need to know to be on a fast track to build those enterprise level sites.  You just need to start small and work your way up.  If you need reference along the way, look at PHP.net or if you prefer to start with frameworks there is Zend, CodeIngiter, CakePHP, Laravel, FuelPHP, just to name a few.

  • Building your first dynamic website – Part 1: Setting up the site and database by David Powers

    Hi all,
    I have just gone through this tutorial http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html and i have managed to get it to work but im trying to adapt it to a few pages with images and content but cant figure out how to add images to the page through pypmyadmin and mysql (im not sure if this is the correct place to look) and i was hoping that someone could shed some light on this for me please. Any help would be much appreciated.
    Kind regards
    Marcus

    This page isnt but i was using the "news" php page:
    this is the php at the top of the page:
    <?php require_once('Connections/check_mag.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_check_mag, $check_mag);
    $query_getArchives = "SELECT DISTINCT DATE_FORMAT(news.updated, '%M %Y') AS archive, DATE_FORMAT(news.updated, '%Y-%m') AS link FROM news ORDER BY news.updated DESC";
    $getArchives = mysql_query($query_getArchives, $check_mag) or die(mysql_error());
    $row_getArchives = mysql_fetch_assoc($getArchives);
    $totalRows_getArchives = mysql_num_rows($getArchives);
    mysql_select_db($database_check_mag, $check_mag);
    $query_getRecent = "SELECT news.post_id, news.title FROM news ORDER BY news.updated DESC LIMIT 10";
    $getRecent = mysql_query($query_getRecent, $check_mag) or die(mysql_error());
    $row_getRecent = mysql_fetch_assoc($getRecent);
    $totalRows_getRecent = mysql_num_rows($getRecent);
    mysql_select_db($database_check_mag, $check_mag);
    $query_getDisplay = "SELECT news.title, news.blog_entry,  DATE_FORMAT(news.updated, '%M %e, %Y') AS formatted FROM news ORDER BY news.updated DESC LIMIT 2";
    $getDisplay = mysql_query($query_getDisplay, $check_mag) or die(mysql_error());
    $row_getDisplay = mysql_fetch_assoc($getDisplay);
    $totalRows_getDisplay = mysql_num_rows($getDisplay);
    $var1_getDisplay2 = "-1";
    if (isset($_GET['archive'])) {
      $var1_getDisplay2 = $_GET['archive'];
      $query_getDisplay = sprintf("SELECT news.title, news.blog_entry, DATE_FORMAT(news.updated, '%%M %%e, %%Y') AS formatted FROM news WHERE DATE_FORMAT(news.updated, '%%Y-%%m') = %s ORDER BY news.updated DESC", GetSQLValueString($var1_getDisplay2, "text"));
    } elseif (isset($_GET['post_id'])) {
      $var2_getDisplay3 = $_GET['post_id'];
      $query_getDisplay = sprintf("SELECT news.title, news.blog_entry, DATE_FORMAT(news.updated, '%%M %%e, %%Y') AS formatted FROM news WHERE news.post_id = %s", GetSQLValueString($var2_getDisplay3, "int"));
    } else {
      $query_getDisplay = "SELECT news.title, news.blog_entry, DATE_FORMAT(news.updated, '%M %e, %Y') AS formatted FROM news ORDER BY news.updated DESC LIMIT 2";
    $getDisplay = mysql_query($query_getDisplay, $check_mag) or die(mysql_error());
    $row_getDisplay = mysql_fetch_assoc($getDisplay);
    $totalRows_getDisplay = mysql_num_rows($getDisplay);
    ?>
    this is the other code:
    <!-- START COL 1/3 -->
      <div class="col_1_5 archivesColor">
    <h2 class="silver">Archives</h2>
        <div class="line"></div>
        <ul>
          <?php do { ?>
            <li><a href="news.php?archive=<?php echo $row_getArchives['link']; ?>"><?php echo $row_getArchives['archive']; ?></a></li>
            <?php } while ($row_getArchives = mysql_fetch_assoc($getArchives)); ?>
        </ul>
        <div class="clear"></div>
        <div class="clear padding10"></div>
      </div>
      <!-- START COL 2/3 -->
      <div class="col_1_5 recentPostsColor">
        <h2 class="silver">Recent Posts</h2>
        <div class="line"></div>
        <ul>
          <?php do { ?>
            <li><a href="news.php?post_id=<?php echo $row_getRecent['post_id']; ?>"><?php echo $row_getRecent['title']; ?></a><div class="line"></div></li>
            <?php } while ($row_getRecent = mysql_fetch_assoc($getRecent)); ?>
        </ul>
      <div class="clear"></div>
        <div class="clear padding10"></div>
    </div>
    <!-- START COL 3/3 -->
    <div class="col_2_3 last blogPostsColor">
      <?php do { ?>
        <h2 class="pink"><?php echo $row_getDisplay['title']; ?></h2>
        <div class="line"></div>
        <p class="align_justify"><?php echo nl2br($row_getDisplay['blog_entry']); ?></p>
          <div class="line"></div>
        <p class="updated silver">Updated on
          <?php echo $row_getDisplay['formatted']; ?><div class="line"></div><div class="clear padding40"></div></p>
          </li>
        <?php } while ($row_getDisplay = mysql_fetch_assoc($getDisplay)); ?>
    </div>
    <div class="clear"></div>
        <div class="clear padding10"></div>
    </div>
    </div>
    </section>
    <!-- END CONTENT -->

Maybe you are looking for

  • Problem in creation of Maintenance Notification.

    Hi All, I have a requirement to create a maintenance notification through BAPI. When I tried to create it by bapi  'BAPI_ALM_NOTIF_CREATE' , I am having one issue. Whenever we create a notification by T-code 'IW21' there is one flag for 'Put in Progr

  • IPhone name not recognized by Win7 x64

    Hi, I have 2 iPhone 4, both are using one Apple universal docker to connect to PC, phone has its own name, and diaplay properly on PC wherever the device name is used, ie, under My Computer, Portable Devices. iPhone 4 are shown as A's iPhone or B's i

  • Tips for Creating Background Image

    I'd like to be able to use a background image on my website like this example: http://my.studiopress.com/themes/parallax/#demo-full I've found a few images, but there either to light or colorful and the white text just doesn't stand out over the imag

  • Need Next Previous Button on List view webpart

    Hi All, 5 items are displaying from the announcement list on the homepage. The client is asking to give next and previous button on the webpart so more than 5 announcements can be seen by the user. What are the various options to implement? Does 2013

  • IPod Classic froze, tried restart, now in recovery mode.

    I dropped my iPod Classic 160 GB, but it played fine for a while, then it froze. I tried to restart it by doing the slide-the-lock-then-press-Menu-and-middle-button thing, but then it said 'Restore in iTunes.' I tried that but now there is a white sc