X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   how do I wrap a php page with my site design and info? (https://forum.x-cart.com/showthread.php?t=58568)

hyratech 03-22-2011 07:36 AM

how do I wrap a php page with my site design and info?
 
Hi,

I dont' know anything about php. I have a php page with a form. (simple) that does blackberry unlocks. I need to include that page on our site.

how can i insert the code to a new page that looks like rest of site? i need the header page, the category page to left, and the login box to the riight. just like the home, product page.

the code for the form is following:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Order by MODEL</title><meta name="DESCRIPTION" content="">
        <link href="http://connectingtoarandomserver.com/api_external/inner.css" rel="stylesheet" type="text/css" />
        <link href="http://connectingtoarandomserver.com/api_external/jquery.css" rel="stylesheet" type="text/css" media="screen">
        <script type="text/javascript" src="http://connectingtoarandomserver.com/api_external/jquery.js" language="javascript"></script>
        <script src="http://connectingtoarandomserver.com/api_external/jquery_002.js" type="text/javascript"></script>
        <script type="text/javascript" src="http://connectingtoarandomserver.com/api_external/swfobject.js"></script>
        <script type="text/javascript" src="http://connectingtoarandomserver.com/api_external/encode64.js" language="javascript"></script>
        <!-- PLEASE DO NOT CHANGE THIS -->
        <script type="text/javascript" src="http://connectingtoarandomserver.com/api_external/web_api.js" language="javascript"></script>
        <!-- END -->
    <body MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0">       
        <form action="" method="post" enctype="multipart/form-data" class="form" name="form" onSubmit="return validateForm()">
            <table cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;"></table>
            <table width="496" border="0" align="center" cellpadding="4" cellspacing="6">
                <tr>
                    <td width="150">EMAIL <span class="required">*</span></td>
                    <td >
                        <!-- PLEASE CHANGE THIS to YOUR IMAGES-->
                        <input id="rcemail" name="rcemail" class="textBox" type="text" value="<?=$_REQUEST["rcemail"]?>">
                        <!-- END-->
                    </td>

                </tr>
                <tr>
                    <td>IMEI <span class="required">*</span></td>
                    <td>
                        <!-- PLEASE CHANGE THIS to YOUR IMAGES-->
                        <input maxlength="15"  id="imei" name="imei" class="textBox" type="text" value="<?=$_REQUEST["imei"]?>">
                        <!-- END-->
                    </td>
                </tr>
                <td>COUNTRY <span class="required">*</span></td>
                <td>
                    <!-- PLEASE DO NOT CHANGE THIS -->
                    <div id="coun">
                        <?php
                        $a = file_get_contents("http://connectingtoarandomserver.com/api_external/web_api_get_info.php?id=262&r1=4&opt=3&sel=".$_REQUEST["country"]);
                        echo ($a);
                        ?>
                    </div>
                    <!-- END -->
                </td>


                <tr>
                    <td>OPERATOR <span class="required">*</span></td>
                    <td ><div id="opr">
                            <!-- PLEASE DO NOT CHANGE THIS -->
                            <?
                            if($_REQUEST["country"]=="")
                                print('<select name="operator" id="operator" class="textBox"><option value="">Select operator</option></select>');
                            else
                                $b = file_get_contents("http://connectingtoarandomserver.com/api_external/web_api_get_info.php?id=262&r1=4&opt=1&q=".$_REQUEST["country"]."&sel=".base64_encode($_REQUEST["operator"]));
                            echo ($b);

                            ?>

                            <!-- END -->
                        </div></td>

                </tr>
                <tr>
                    <td>MODEL <span class="required">*</span></td>
                    <td >
                        <!-- PLEASE DO NOT CHANGE THIS -->
                        <?
                        if($_REQUEST["country"]=="" && $_REQUEST["operator"]=="" )
                            print('<select name="model_val" id="model_val" class="textBox"><option value="">Select model</option></select>');
                        else
                            $c = file_get_contents("http://connectingtoarandomserver.com/api_external/web_api_get_info.php?id=262&r1=4&opt=2&q=".base64_encode($_REQUEST["operator"])."&cnt=".$_REQUEST["country"]);
                        echo ($c);
                        ?>
                        <!-- END -->
                </tr>


                <!-- PLEASE DO NOT CHANGE THIS -->
<input type="hidden" name="r1" id ="r1" value="1" >
<input type="hidden" name="api_key" id ="api_key" value="NDhlNGNhODRlMGJlYjVlMjhjNzQ1NzdmODEyMjc5NGJlZThmNjUyYg==">
                <!-- END -->

                <tr>
                    <td></td>
                    <td align="right">
                        <!-- PLEASE CHANGE THIS to YOUR IMAGES-->
                        <input type="submit" value="Submit Order" name="submitbtn" class="submit" style="margin: 0;" />
                        <!-- END-->
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>


the page has to be saved in php format.

any help from you helpful guys will greatly be appreciated.

balinor 03-22-2011 07:40 AM

Re: how do I wrap a php page with my site design and info?
 
Just add it as a static page. Use {php} to surround the php portions of the page:

{php}
php code here
{/php}

hyratech 03-22-2011 07:48 AM

Re: how do I wrap a php page with my site design and info?
 
the php code was provided by our unlocking supplier.
it works if i save code in .php .. but if in put in in html extension with {php} at the beginning and {/php} the form breaks.

hyratech 03-22-2011 07:57 AM

Re: how do I wrap a php page with my site design and info?
 
Ryan,

Is this something i can hire you to do for me? i'm sure it'll just take a second for experts like you.

balinor 03-22-2011 09:04 AM

Re: how do I wrap a php page with my site design and info?
 
No, an embedded static page I mean - the php code only goes around the php portion of your code above, not the whole form. X-Cart pages are php pages, so the page itself is already php, you just need to add the form.

I'm afraid we don't offer hourly consulting services, sorry :(


All times are GMT -8. The time now is 05:20 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.