Example #1
0
    do {
        // already have the first record
        $sku = $pre8->f("sku");
        $csku = $pre8->f("compsku");
        $qty = $pre8->f("qty");
        $invover = (int) $pre8->f("invover");
        $olzone = (int) $pre8->f("olzone");
        $ollang = (int) $pre8->f("ollang");
        // get the short product description
        $pre10->query("select prodname from prodlang " . "where prodlzid={$olzone} and prodlid={$ollang} and prodlsku='{$sku}'");
        if (!$pre10->next_record()) {
            $pre11->query("delete from oline where orderid='{$cartid}'");
            continue;
        }
        $sdescr = stripslashes(ereg_replace("<[^>]+>", " ", $pre10->f("prodname")));
        $pre10->free_result();
        $pre10->query("select prodprice,prodsetup,prodweight,prodflag1 from prod " . "where prodzid={$olzone} and prodsku='{$sku}'");
        if (!$pre10->next_record()) {
            $pre11->query("delete from oline where orderid='{$cartid}'");
            continue;
        }
        $prodprice = (double) $pre10->f("prodprice");
        $prodsetup = (double) $pre10->f("prodsetup");
        $prodweight = (double) $pre10->f("prodweight");
        $flag1 = (int) $pre10->f("prodflag1");
        $pre10->free_result();
        ?>

<tr><td class="previewcell" colspan="2" align="left" valign="top" bgcolor="#FFFFFF">
<font face="Arial,Helvetica" size="1">
<?php 
Example #2
0
$cybercash->ccstate = "{$billing_state}";
$cybercash->cczip = "{$billing_zip}";
$cybercash->cccountry = "USA";
// submit the charge to CyberCash and parse out the return data
if (!$cybercash->send()) {
    $cybercash->errorHandler("Error: no data received back from CyberCash");
}
$POP = $cybercash->POP;
parse_str(ereg_replace("pop.", "", $POP));
if ($status != 'success') {
    // get the Web table
    $fcw = new FC_SQL();
    $fcw->query("select webback,webtext,weblink,webvlink,webalink,webbg,webfree,websort " . "from fishcart where webzid={$zid} and weblid={$lid}");
    $fcw->next_record();
    $srt = $fcw->f("websort");
    $fcw->free_result();
    // END OF ESSENTIAL CART DISPLAY CODE FROM LINE 1 TO HERE
    ?>

<html>
<head>
<link rel="stylesheet" ID href="style.css" type="text/css" />
<title>
</title>
</head>

<body<?php 
    if ($fcw->f("webback")) {
        ?>
 background="<?php 
        echo $fcw->f("webback");
Example #3
0
function show_countries($zid, $lid, $matchiso, $lang_iso)
{
    $ret = NULL;
    $fct = new FC_SQL();
    $fct->query("select ctrylangciso,ctrylangname from country,countrylang " . "where ctryzid={$zid} and ctrylid={$lid} and ctryactive=1 and " . "ctryiso=ctrylangciso and ctrylangliso='{$lang_iso}' order by ctryseq,ctrylangname");
    while ($fct->next_record()) {
        $iso = $fct->f('ctrylangciso');
        $name = $fct->f('ctrylangname');
        if ($matchiso == $iso) {
            $chk = ' selected';
        } else {
            $chk = '';
        }
        $ret .= "<option value=\"{$iso}\"{$chk}>{$name}</option>\n";
    }
    $fct->free_result();
    return $ret;
}
Example #4
0
?>
">
<input type=hidden name=oldsku value="">

Default Zone:<br>

</td>
</tr>
<tr><td valign=top align=center bgcolor=#ffffff>

<?php 
$currz = $fcm->f("zoneid");
$fcz->query("select count(*) as cnt from zone");
$fcz->next_record();
$zt = (int) $fcz->f('cnt');
$fcz->free_result();
$fcz->query("select zoneid,zonedescr from zone order by zoneid");
?>
<select name=zoneid size="<?php 
echo $zt + 1;
?>
" onFocus="currfield='zoneid';">
<option value="">[select a zone]
<?php 
while ($fcz->next_record()) {
    $zid = $fcz->f("zoneid");
    if ($currz == $zid) {
        echo "<option value=\"{$zid}\" selected>";
        $oldzid = $zid;
    } else {
        echo "<option value=\"{$zid}\">";
Example #5
0
        $sdate = mktime(0, 0, 0, $nsm, $nsd, $nsy);
        $ndate = mktime(0, 0, 0, $nem, $ned, $ney);
    } else {
        $sdate = 0;
        $ndate = 0;
    }
}
$fco = new FC_SQL();
$fcu = new FC_SQL();
if ($act == "insert") {
    $fcu->query("select count(*) as cnt from oprod where oprodsku='{$sku}'");
    $fcu->next_record();
    if ($fcu->f('cnt') == 0) {
        $fco->query("insert into oprod (oprodsku,ostart,oend,ozid) " . "values ('{$sku}',{$sdate},{$ndate},{$zoneid})");
    }
    $fcu->free_result();
} elseif ($act == "update") {
    $fco->query("update oprod " . "set oprodsku='{$sku}',ostart={$sdate},oend={$ndate} where oprodsku='{$sku}'");
} elseif ($act == "delete") {
    $fco->query("delete from oprod where oprodsku='{$sku}'");
}
$fco->commit();
?>

<p>

The <?php 
echo $act;
?>
 action is complete.
Example #6
0
    <?php 
    exit;
}
$fcl = new FC_SQL();
$fcm = new FC_SQL();
$fct = new FC_SQL();
$fcta = new FC_SQL();
$fctb = new FC_SQL();
$fctc = new FC_SQL();
if ($act == "update") {
    //get the old langfppromo
    $fcta->query("select langfppromo from lang where langid={$lngid} and " . "langzid={$zoneid}");
    if ($fcta->next_record()) {
        $oldfppromo = (int) $fcta->f('langfppromo');
    }
    $fcta->free_result();
    // oracle clob
    if ($databaseeng == "oracle") {
        $res = $fcl->query("update lang set " . "langzid={$langzid},     langdescr='{$langdescr}',langtmpl='{$langtmpl}', " . "langtdsp='{$langtdsp}', langterr='{$langterr}',  langshow='{$langshow}', " . "langgeo='{$langgeo}',   langordr='{$langordr}',  langfinl='{$langfinl}', " . "langproc='{$langproc}', langstmpl='{$langstmpl}',langiso ='{$langiso}', " . "langwelcome='{$langwelcome}',langcopy='{$langcopy}',langterms=empty_clob()," . "langfppromo={$langfppromo} " . "where langid={$lngid}", langterms, $langterms);
    } else {
        $res = $fcl->query("update lang set " . "langzid={$langzid},     langdescr='{$langdescr}',langtmpl='{$langtmpl}', " . "langtdsp='{$langtdsp}', langterr='{$langterr}',  langshow='{$langshow}', " . "langgeo='{$langgeo}',   langordr='{$langordr}',  langfinl='{$langfinl}', " . "langproc='{$langproc}', langstmpl='{$langstmpl}',langiso ='{$langiso}', " . "langwelcome='{$langwelcome}',langcopy='{$langcopy}',langterms='{$langterms}'," . "langfppromo={$langfppromo} " . "where langid={$lngid}");
    }
} elseif ($act == "new") {
    $fcm->query('select numlang from master');
    $fcm->next_record();
    $numl = (int) $fcm->f('numlang');
    $fcm->free_result();
    $numl += 1;
    $fcm->query("update master set numlang={$numl}");
    // oracle clob
    if ($databaseeng == "oracle") {
Example #7
0
$fcl = new FC_SQL();
$fcp = new FC_SQL();
if (!$zoneid || !$langid) {
    echo 'Please click Back and select a zone and/or language.  Thank you.';
    exit;
}
?>

<h2 align="center">Related Product Maintenance</h2>
<hr />

<?php 
$fcp->query("select count(*) as cnt from prodrel where relzone={$zoneid}");
$fcp->next_record();
$pt = $fcp->f('cnt');
$fcp->free_result();
?>

<center>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#666666" width="650" class="text">
<tr><td colspan="2" align="center" valign="middle" bgcolor="#ffffff">

<a href="index.php?zoneid=<?php 
echo $zoneid;
?>
&amp;langid=<?php 
echo $langid;
?>
"
    onclick="closehelp()">
Return To Central Maintenance Page</a><br />
Example #8
0
$get_subz = new FC_SQL();
$get_subz->query("select subzsid,subzdescr from subzone " . "where subzid={$zoneid} order by subzdescr");
while ($get_subz->next_record()) {
    $pszid = (int) $get_subz->f('subzsid');
    if ($pszid == $currsubzparent) {
        $chk = ' selected';
    } else {
        $chk = '';
    }
    if ($pszid != $subzsid) {
        // don't show our own to prevent self-reference
        $pszidd = $get_subz->f('subzdescr');
        print "<option value=\"{$pszid}\"{$chk}>{$pszidd}</option>\n";
    }
}
$get_subz->free_result();
?>
</select><br />

</td></tr>
<tr><td valign="top" align="center" bgcolor="#FFFFFF" width="50%">

SubZone Vendor ID:<br />
<select name="subzvendid" size="1">
<?php 
$fcz->query("select vendname from vend where vendid={$subzvendid}");
$fcz->next_record();
echo '<option value="' . $subzvendid . '" selected="selected">' . $fcz->f('vendname') . '</option>';
$fcv->query("select vendid,vendname from vend where vendzid={$zoneid} and vendid!={$subzvendid}");
while ($fcv->next_record()) {
    ?>
Example #9
0
if ($showall) {
    if ($databaseeng == 'odbc' && $dialect == 'solid') {
        $fccc->query("select count(*) as cnt from _ccnum");
    } else {
        $fccc->query("select count(*) as cnt from {$instid}_ccnums");
    }
} else {
    if ($databaseeng == 'odbc' && $dialect == 'solid') {
        $fccc->query("select count(*) as cnt from _ccnum where fetched='0'");
    } else {
        $fccc->query("select count(*) as cnt from {$instid}_ccnums " . "where fetched='0'");
    }
}
$fccc->next_record();
$cnt = $fccc->f("cnt");
$fccc->free_result();
if ($databaseeng == 'odbc' && $dialect == 'solid') {
    $fccc->query("select count(*) as cnt from _ccnum");
} else {
    $fccc->query("select count(*) as cnt from {$instid}_ccnums");
}
$fccc->next_record();
$tot = $fccc->f("cnt");
$fccc->free_result();
?>

<?php 
if ($cnt) {
    ?>
<tr><td align=center colspan=4 bgcolor=#ffffff>
<?php 
Example #10
0
$oh->query("select orderid,tstamp from ohead");
$tprod = 0;
while ($oh->next_record()) {
    $ts = $oh->f("tstamp");
    $oi = $oh->f("orderid");
    $ds = (int) date("d", $ts);
    $ol->query("select * from oline where orderid='{$oi}'");
    $j = 0;
    while ($ol->next_record()) {
        if (!$j) {
            echo "\ncustid:{$oi}  date: {$ds}\n";
            $tord++;
        }
        $qt = (int) $ol->f("qty");
        $sk = $ol->f("sku");
        $op->query("select prodprice from prod where prodsku='{$sk}'");
        if ($op->next_record()) {
            $prc = (double) $op->f("prodprice");
        } else {
            $prc = 0;
        }
        $op->free_result();
        $ltot = $prc * $qt;
        $tamt += (double) $ltot;
        echo "   sku:{$sk}   qty: {$qt}   price: {$prc}  ltot: {$ltot}\n";
        $tprod++;
        $j++;
    }
    $ol->free_result();
}
echo "\ntotal orders: {$tord}   total products: {$tprod}  pending: {$tamt}\n";
Example #11
0
<?php 
    exit;
}
$fcp = new FC_SQL();
$fcg = new FC_SQL();
$fcp->query("select * from prodopt where poptid={$poptid} and " . "poptlid={$langid} and poptzid={$zoneid}");
$fcp->next_record();
// create a javascript array of prodopt group names
echo "<script>\nvar jspoptgrp = new Array();\n";
$fcg->query("select pgrpgrp,pgrpname from prodoptgrp " . "where pgrpzid={$zoneid} and pgrplid={$langid} order by pgrpgrp");
while ($fcg->next_record()) {
    $pgrpgrp = (int) $fcg->f('pgrpgrp');
    $pgrpname = $fcg->f('pgrpname');
    echo "jspoptgrp[\"{$pgrpgrp}\"] = \"{$pgrpname}\";\n";
}
$fcg->free_result();
echo "</script>\n";
?>

<h2 align=center>Modify A Product Option</h2>
<hr>

<center>
<table border="0" cellpadding="3" cellspacing="1" bgcolor="#666666" width="650" class="text">
<tr><td align=center colspan=2 bgcolor="#FFFFFF">

<a href="index.php?zoneid=<?php 
echo $zoneid;
?>
&langid=<?php 
echo $langid;
Example #12
0
<option value="0">[top level category]
<?php 
while ($fct->next_record()) {
    $catval = (int) $fct->f("catval");
    if ($catval == $cat) {
        continue;
        // don't show this cat to avoid self reference
    }
    if ($catval == $catunder) {
        echo "<option value=\"{$catval}\" selected>";
    } else {
        echo "<option value=\"{$catval}\">";
    }
    echo stripslashes(substr($fct->f("catdescr"), 0, 30) . "\n");
}
$fct->free_result();
?>
</select><br />

Category Description:
<i>80 characters max</i><br />
<input name="descr" size="40" maxsize="80"
 value="<?php 
echo stripslashes($fcc->f("catdescr"));
?>
"
 onFocus="currfield='catdescr'" /><br />

Category Masthead Text:
<i>as long as desired</i><br />
<textarea name="catmast" wrap="virtual" rows="12" cols="60"
Example #13
0
}
// SQL INJECTION AVOIDENCE
$zid = (int) $zid;
$lid = (int) $lid;
$purchid = (int) $purchid;
$orderproc_flag = !empty($orderproc_flag) ? (int) $orderproc_flag : 0;
// remove anything but a-z, A-Z, 0-9 and _
$cartid = eregi_replace('[^a-z0-9_]', '', $cartid);
//uncomment below if ciso ever used, keep only first three a-z
//$ciso=substr(ereg_replace('[^a-z]','',$ciso),0,3);
if (empty($zid)) {
    // get the default zone if not given in cookie
    $fm->query('select zoneid from master');
    $fm->next_record();
    $zid = (int) $fm->f('zoneid');
    $fm->free_result();
}
// make sure a zone exists for the value in the cookie
// take the first we get if no such zone
$fm->query("select zonedeflid,zflag1 from zone where zoneid={$zid}");
if ($fm->next_record()) {
    $deflid = (int) $fm->f('zonedeflid');
    $zflag1 = (int) $fm->f('zflag1');
    $fm->free_result();
} else {
    $fm->query('select zoneid,zonedeflid,zflag1 from zone');
    $fm->next_record();
    $zid = (int) $fm->f('zoneid');
    $lid = (int) $fm->f('zonedeflid');
    $zflag1 = (int) $fm->f('zflag1');
    $fm->free_result();
Example #14
0
<?php 
}
// order line count > 0
?>
</form>


<?php 
//auxilliary links. jheg
echo "<br />";
$fcal = new FC_SQL();
$fcal->query("select count(*) as cnt from auxlinks where loc=2");
$fcal->next_record();
$auxlinkcnt = (int) $fcal->f('cnt');
$fcal->free_result();
$fcal->query("select title, url from auxlinks where loc=2 order by seq");
if ($auxlinkcnt) {
    ?>
<tr><td class="showcartcell" align="center" valign="top" colspan="4" bgcolor="#FFFFFF">
<?php 
    while ($fcal->next_record()) {
        $url = stripslashes($fcal->f("url"));
        eval("\$url = \"{$url}\";");
        echo '| <a href="' . $url . '"><b>' . stripslashes($fcal->f("title")) . "</b></a> |\n";
    }
    $fcal->free_result();
    ?>
</td></tr>
<?php 
}
Example #15
0
$fcca->query("select * from prodrel where relzone={$zoneid} and relsku='{$relsku}'");
if ($fcca->next_record()) {
    $prelf = 1;
} else {
    $prelf = 0;
}
$fcca->free_result();
/*fetch prodflag1 from prod table
Any other prodflag1 flag other then prodrel should be added here to keep
prodflag1 complete
*/
$fccb = new FC_SQL();
$fccb->query("select prodflag1 from prod where prodsku='{$relsku}' " . "and prodzid='{$zoneid}'");
$fccb->next_record();
$prodflag1 = (int) $fccb->f("prodflag1");
$fccb->free_result();
$flag1 = 0;
if ($prodflag1 & $flag_noship) {
    $flag1 |= (int) $flag_noship;
}
if ($prodflag1 & $flag_notax) {
    $flag1 |= (int) $flag_notax;
}
if ($prodflag1 & $flag_novat) {
    $flag1 |= (int) $flag_novat;
}
if ($prodflag1 & $flag_useesd) {
    $flag1 |= (int) $flag_useesd;
}
if ($prodflag1 & $flag_genesd) {
    $flag1 |= (int) $flag_genesd;
Example #16
0
function fc_display_product($fc_sku = '', $zid = 1, $lid = 1, $cat = 0)
{
    // display one product with options
    // doesn't return anything
    global $fc_cartid, $flag_persvc, $flag_webshowqty;
    global $fc_csym, $fc_webfree, $fc_webflags1;
    global $flag_poptskusub, $flag_poptskumod, $flag_poptskusuf, $flag_poptskupre;
    global $flag_poptgrpexc, $flag_poptprcrel, $flag_poptgrpqty, $flag_poptgrpreq;
    $now = time();
    $fco = new FC_SQL();
    $fcp = new FC_SQL();
    $fcrp = new FC_SQL();
    $fcrpl = new FC_SQL();
    $fcp->query('select prodsdescr,proddescr,prodaudio,prodvideo,prodsetup,prodprice,' . 'prodsalebeg,prodsaleend,prodpic,prodpicw,prodpich,prodpersvc,prodflag1 ' . 'from prod,prodlang ' . "where prodsku='{$fc_sku}' and prodlsku='{$fc_sku}' and prodsku=prodlsku");
    $fcp->next_record();
    $flag1 = (int) $fcp->f('prodflag1');
    ?>
 
<tr><td align=left valign=top colspan=1>

 <table width="100%" cellpadding=0 cellspacing=0 border=0>
 <tr><td align=left valign=top colspan=3>
 <br>

<?php 
    if ($fcp->f("prodpic")) {
        // show the product picture (if defined)
        ?>

 <img src="<?php 
        echo $fcp->f("prodpic");
        ?>
"
  width="<?php 
        echo $fcp->f("prodpicw");
        ?>
"
  height="<?php 
        echo $fcp->f("prodpich");
        ?>
"
  alt="" align=left>

<?php 
    }
    // end of the product picture
    ?>

  <b><?php 
    echo stripslashes($fcp->f("prodsdescr"));
    ?>
:</b>
     <?php 
    echo stripslashes($fcp->f("proddescr"));
    ?>
<br>

 </td></tr>
<tr><td align=left valign=bottom colspan="1">

<?php 
    if ($fcp->f("prodaudio")) {
        ?>
  <a href="<?php 
        echo $fcp->f("prodaudio");
        ?>
"><i><?php 
        echo fc_text("audiosample");
        ?>
</i></a><br>
<?php 
    }
    ?>
 

    </td><td align=center valign=bottom colspan="1">

<?php 
    if ($fcp->f("prodvideo")) {
        ?>
	  <a href="<?php 
        echo $fcp->f("prodvideo");
        ?>
"><i><?php 
        echo fc_text("videosample");
        ?>
</i></a><br>
<?php 
    }
    ?>

	    </td><td colspan=1 align=right valign=middle>
		 </td></tr>
 <tr><td align=left valign=middle colspan=3>
<form method=post action="//fishcart/showcart.php?cartid=<?php 
    echo $fc_cartid;
    ?>
&zid=<?php 
    echo $zid;
    ?>
&lid=<?php 
    echo $lid;
    ?>
&product=<?php 
    echo $fc_sku;
    ?>
&cat=<?php 
    echo $cat;
    ?>
">
<?php 
    // show the product options; see showcart for a detailed description
    $poptqty = 0;
    $poptgrp = 0;
    // nmb
    $poptflag1 = 0;
    // nmb
    $poptogrp = -1;
    // -1 is initial value
    $poptgrpcnt = 0;
    // # of options per group
    $poptgrplst = '';
    // : separated list of all represented groups
    $fco->query("select poptid,poptname,poptsdescr,poptsetup,poptprice,poptgrp,poptskumod," . "poptflag1 from prodopt where poptsku='{$fc_sku}' order by poptgrp,poptseq");
    if ($fco->next_record()) {
        $i = 0;
        do {
            $poptid = (int) $fco->f("poptid");
            $poptgrp = (int) $fco->f("poptgrp");
            $poptflag1 = (int) $fco->f("poptflag1");
            $poptsetup = (double) $fco->f("poptsetup");
            $poptprice = (double) $fco->f("poptprice");
            $poptname = stripslashes($fco->f("poptname"));
            $poptsdescr = stripslashes($fco->f("poptsdescr"));
            if ($poptogrp != -1 && $poptogrp != $poptgrp) {
                // group rollover check
                echo "</select>";
                if ($poptflag1 & $flag_poptgrpqty) {
                    // qty is required
                    echo '&nbsp;&nbsp;&nbsp;&nbsp;' . fc_text("qty") . '<input name="' . $fc_sku . '_' . $poptogrp . '_qty" size=3>' . "\n";
                }
                if ($poptoflg & $flag_poptgrpreq) {
                    // option group is required
                    echo '<input type=hidden name="' . $fc_sku . '_' . $poptogrp . '_req" value=1>' . "\n";
                } else {
                    echo '<input type=hidden name="' . $fc_sku . '_' . $poptogrp . '_req" value=0>' . "\n";
                }
                echo "<br>\n<select name=\"{$fc_sku}_{$poptgrp}_popt[]\">\n";
                if ($poptogrp >= 0) {
                    $poptgrplst .= "{$poptogrp}:";
                }
                $poptgrpcnt = 0;
                // zero the counter
            } elseif (!$i) {
                // nmb
                echo "<select name=\"{$fc_sku}_{$poptgrp}_popt[]\">\n";
            }
            if ($poptflag1 & $flag_poptgrpexc) {
                $popttype = 'radio';
            } else {
                $popttype = 'checkbox';
            }
            // compose composite sku
            $csku = '';
            if ($poptflag1 & $flag_poptskupre) {
                $csku = $fco->f("poptskumod") . $csku;
            } elseif ($poptflag1 & $flag_poptskusuf) {
                $csku = $csku . $fco->f("poptskumod");
            } elseif ($poptflag1 & $flag_poptskumod) {
                $csku = ereg_replace($fco->f("poptskusub"), $fco->f("poptskumod"), $csku);
            } elseif ($poptflag1 & $flag_poptskusub) {
                $csku = $fco->f("poptskumod");
            }
            /* nmb
              echo '<input type='.$popttype.' name="'.$fc_sku.'_'.$poptgrp.
              		'_popt[]" value='.$poptid.'>'.
            		$poptname . $poptsdescr .'&nbsp;'.fc_text('reqflag')."<br>\n";
               nmb */
            // nmb
            echo "<option value=\"{$poptid}\"> {$poptname}\n";
            if ($poptsetup) {
                echo '&nbsp;&nbsp;&nbsp;&nbsp;' . fc_text("setup") . sprintf("%s%.2f\n", $fc_csym, $poptsetup);
                // nmb sprintf("%s%.2f<br>\n",$fc_csym,$poptsetup);
            }
            echo '&nbsp;&nbsp;&nbsp;&nbsp;' . fc_text("price");
            // nmb added if/else below
            if ($poptflag1 & $flag_poptprcrel && $poptprice) {
                $relflg = '+';
            } else {
                $relflg = '';
            }
            if ($poptprice) {
                // nmb echo sprintf("%s%.2f<br>\n",$fc_csym,$poptprice);
                echo ' ' . $relflg . sprintf("%s%.2f\n", $fc_csym, $poptprice);
            } else {
                // nmb echo fc_text("nocharge")."<br>\n";
                echo ' ' . $relflg . fc_text("nocharge") . "\n";
            }
            $poptgrpcnt++;
            // incr count of options per group
            $poptogrp = $poptgrp;
            // keep the current group ID
            $poptoflg = $poptflag1;
            // keep the current group flag set
            $i++;
        } while ($fco->next_record());
        $fco->free_result();
        // nmb
        if ($i) {
            echo "</select>";
        }
        // always do this stuff for last option group rollover check
        if ($poptflag1 & $flag_poptgrpqty) {
            // qty is required
            echo '&nbsp;&nbsp;&nbsp;&nbsp;' . fc_text("qty") . '<input name="' . $fc_sku . $poptgrp . 'qty" size=3><br>' . "\n";
        }
        if ($poptflag1 & $flag_poptgrpreq) {
            // option group is required
            echo '<input type=hidden name="' . $fc_sku . '_' . $poptgrp . '_req" value=1>' . "\n";
        } else {
            echo '<input type=hidden name="' . $fc_sku . '_' . $poptgrp . '_req" value=0>' . "\n";
        }
        if ($poptgrp >= 0) {
            $poptgrplst .= "{$poptgrp}";
        }
        echo '<input type=hidden name="' . $fc_sku . '_grplst" value="' . $poptgrplst . '">' . "\n";
    }
    // if product options
    ?>
 
 
 </td></tr>
<tr><td align=left valign=middle colspan=1>
 <i><?php 
    echo fc_text("sku");
    ?>
 <?php 
    echo $fc_sku;
    ?>
</i>
</td><td align=left valign=middle colspan=1>
<?php 
    // show the product price
    $setup = (double) $fcp->f("prodsetup");
    if ($setup) {
        echo sprintf("%s %s%8.2f ", fc_text("setup"), $fc_csym, $setup);
    }
    $prc = '';
    if ($fcp->f("prodprice") == 0) {
        // free, show alternative text
        if (!empty($cat)) {
            $prc = $fcs->f("catfree");
        }
        if (empty($prc)) {
            $prc = $fc_webfree;
        }
    } else {
        // not free, check for sale price
        if ($fcp->f("prodsalebeg") < $now && $now < $fcp->f("prodsaleend")) {
            // on sale
            $prc = sprintf("<b>%s %s%8.2f</b>", fc_text("onsale"), $fc_csym, $fcp->f("prodsaleprice"));
        } else {
            $prc = sprintf("%s %s%8.2f", fc_text("price"), $fc_csym, $fcp->f("prodprice"));
        }
    }
    echo $prc;
    if ($flag1 & $flag_persvc) {
        //echo ' '.fc_text('periodic');
        echo ' ' . $fcp->f('prodpersvc');
    }
    ?>

 </td><td align=right valign=middle colspan=1>

<?php 
    // SHOW THE ADD TO ORDER BUTTON
    // with product options, it is no longer feasible to show the qty
    // on order, as we don't know which options have been chosen
    if ($fc_webflags1 & $flag_webshowqty) {
        $qty = "1";
    } else {
        $qty = "";
    }
    ?>

<input type=text size=3 name=quantity value=<?php 
    echo $qty;
    ?>
><input type=submit value="<?php 
    echo fc_text('shortadd');
    ?>
">
</td></tr>
</form>

 <tr><td align=left valign=bottom colspan=3>

 </td></tr>
 
 <?php 
    // show related products
    $fcrp->query("select relprod from prodrel where relsku='{$fc_sku}' order by relseq");
    while ($fcrp->next_record()) {
        $rsku = $fcrp->f('relprod');
        $fcrpl->query("select prodname from prodlang where prodlsku='{$rsku}' " . "and prodlzid={$zid} and prodlid={$lid}");
        $fcrpl->next_record();
        $pname = strip_tags($fcrpl->f("prodname"));
        ?>
 <tr><td align=left valign=top colspan=3>
 <a href="display.php?cartid=<?php 
        echo $cartid;
        ?>
&zid=<?php 
        echo $zid;
        ?>
&lid=<?php 
        echo $lid;
        ?>
&psku=<?php 
        echo $rsku;
        ?>
"><?php 
        echo $pname;
        ?>
</a><br>
 </td></tr>
 <?php 
    }
    $fcrp->free_result();
    ?>
 </table>

 </td></tr>
<?php 
}
Example #17
0
$get_scats = new FC_SQL();
$get_cats->query("select catval,catpath from cat " . "where catzid={$zoneid} and catlid={$lngid} order by catpath");
while ($get_cats->next_record()) {
    $patharray = explode(":", $get_cats->f("catpath"));
    $catlst = $get_cats->f("catval");
    $selected = '';
    if ($catlst == $fp_cat) {
        $selected = ' selected';
    }
    print "<option value=\"{$catlst}\"{$selected}>";
    while (list($key, $val) = each($patharray)) {
        if ($val != "") {
            $get_scats->query("select catdescr from cat " . "where catzid={$zoneid} and catlid={$lngid} and catval={$val}");
            if ($get_scats->next_record()) {
                print '/' . $get_scats->f("catdescr");
                $get_scats->free_result();
            }
        }
    }
    print "</option>\n";
}
$get_cats->free_result();
?>
</select>
</p>

<p>
Welcome text shown on the front page:<br />
<i>full HTML markup required for proper formatting</i><br />
<input type="checkbox" name="fmtwelcome" value="1" checked>&nbsp;Preserve line break formatting?<br>
<textarea name="langwelcome" rows=6 cols=60 
Example #18
0
</td></tr>
<tr><td align="center" bgcolor="#FFFFFF">

<form name="couponmod" method="post" action="couponmod.php">

To modify an existing coupon profile,<br />
select its name from the list and<br />
click <i>Modify Selected Profile</i>.
<br />

<?php 
$coupon = new FC_SQL();
$coupon->query("select count(*) as cnt from coupon");
$coupon->next_record();
$len = (int) $coupon->f("cnt");
$coupon->free_result();
?>

<select name="cpnid" size="<?php 
echo $len + 1;
?>
"
 onChange="document.couponmod.action='couponmod.php';submit();">
<option name=cpnid value="" selected>[no change]</option>
<?php 
// query the coupon
$coupon->query("select cpnid,cpnredeem from coupon order by cpnid");
while ($coupon->next_record()) {
    ?>
<option value="<?php 
    echo $coupon->f("cpnid");
Example #19
0
">
<input type="hidden" name="zoneid" value="<?php 
echo $zoneid;
?>
">
<input type="hidden" name="langid" value="<?php 
echo $langid;
?>
">
<input type="submit" value="Update User">
<input type="reset"  value="Previous Values">

</form>
<p>

<a href="index.php?zoneid=<?php 
echo $zoneid;
?>
&langid=<?php 
echo $langid;
?>
"
 onClick="closehelp();">
Return to Central Maintenance Page</a><br>

<?php 
$fcpw->free_result();
?>

<?php 
require './footer.php';
Example #20
0
    }
    $max_seq = new FC_SQL();
    if ($databaseeng == 'odbc' && $dialect == 'solid') {
        $max_seq->query("select seq from auxtext where rownum < 2 order by seq desc");
    } elseif ($databaseeng == 'postgres') {
        $max_seq->query("select seq from auxtext order by seq desc limit 1,0");
    } elseif ($databaseeng == 'mssql') {
        $max_seq->query("select top 1 seq from auxtext order by seq desc");
    } elseif ($databaseeng == 'oracle') {
        $max_seq->query("select seq from auxtext where rownum < 2 order by seq desc");
    } elseif ($databaseeng == 'mysql') {
        $max_seq->query("select seq from auxtext order by seq desc limit 0,1");
    }
    $max_seq->next_record();
    $seq = $max_seq->f("seq") + 1;
    $max_seq->free_result();
    $res = $fcc->query("insert into auxtext (" . "seq,loc,title,text) values ({$seq},{$loc},'{$title}','{$text}')");
} elseif ($act == "mod") {
    $res = $fcc->query("update auxtext " . "set loc={$loc},title='{$title}', text='{$text}' where rid='{$rid}'");
} elseif ($act == "del") {
    $res = $fcc->query("delete from auxtext " . "where rid={$rid}");
} elseif ($act == "seq") {
    $i = 0;
    while ($i < $scount) {
        $seq = (int) getparam('lseq' . $i);
        $rid = (int) getparam('link' . $i);
        $res = $fcc->query("update auxtext set seq={$seq} where rid='{$rid}'");
        $i++;
    }
}
if (!$res) {
Example #21
0
<option value="<?php 
                        echo $fcmt->f("shipid");
                        ?>
"><?php 
                        echo stripslashes($fcmt->f("shipdescr"));
                        ?>
</option>
<?php 
                    }
                    // if shipdef
                }
                // while
                ?>
</select><br />
<?php 
                $fcmt->free_result();
            } else {
                ?>
<input type="hidden" name="shipid" value="<?php 
                echo $curshipid;
                ?>
">
<?php 
                echo $defshipdesc . "<br />\n";
            }
        } else {
            ?>
<i><?php 
            echo stripslashes($fct->f("shipdescr"));
            ?>
</i><br />
Example #22
0
}
require './pwesd.php';
$now = time();
// increment the download count
$fcesd = new FC_SQL();
$fcesd->query("select esddlcnt,esddlmax,esddlexp,esddlfile from esd " . "where esdid={$esdid} and esdoid='{$pwuid}'");
if (!$fcesd->next_record()) {
    echo fc_text('esdnodl');
    echo fc_text('esdcustsvc');
    exit;
}
$esddlcnt = (int) $fcesd->f('esddlcnt') + 1;
$esddlmax = (int) $fcesd->f('esddlmax');
$esddlexp = (int) $fcesd->f('esddlexp');
$esddlfile = $fcesd->f('esddlfile');
$fcesd->free_result();
if ($esddlcnt > $esddlmax || $now > $esddlexp) {
    echo fc_text('esddlmax');
    echo fc_text('esdcustsvc');
    exit;
}
$fcesd->query("update esd set esddlcnt={$esddlcnt} where esdid={$esdid}");
$fcesd->commit();
$file = substr(strrchr($esddlfile, '/'), 1);
set_magic_quotes_runtime(0);
$fd = fopen($esddlfile, 'rb');
if ($fd) {
    $size = filesize($esddlfile);
    header("Content-Disposition: attachment; filename={$file}");
    header("Content-Length: {$size}");
    header("Content-Type: application/download");
Example #23
0
</td></tr>
<tr><td align=center bgcolor=#ffffff>

<form name=langmod method="post" action="langmod.php">

To modify an existing language profile,<br>
select its name from the list and<br>
click <i>Modify Selected Profile</i>.
<br>

<?php 
$fcl = new FC_SQL();
$fcl->query("select count(*) as cnt from lang " . "where langzid={$zoneid} and langid={$langid}");
$fcl->next_record();
$len = $fcl->f("cnt");
$fcl->free_result();
?>

<select name=lngid size="<?php 
echo $len + 1;
?>
"
 onChange="document.langmod.action='langmod.php';submit();">
<option value="" selected>[no change]

<?php 
$fcl->query("select * from lang " . "where langzid={$zoneid} and langid={$langid} order by langid");
while ($fcl->next_record()) {
    ?>
 <option value="<?php 
    echo $fcl->f("langid");
Example #24
0
    $pr = $fcp->query("update prodopt set poptflag1={$poptflag1},poptflag2={$poptflag2} " . "where poptsku='{$ssku}' and poptgrp={$poptgrp}");
    $fcp->commit();
}
//set the prodlflag correctly        bvo
/*
First the options after updating all tables are fetched again
if there is an option in the current language defined it is
inserted into prodlflag1
(bvo)
*/
$fcco = new FC_SQL();
$fcco->query("select * from prodopt where poptzid={$zoneid} and poptlid={$langid}" . " and poptsku='{$ssku}'");
if ($fcco->next_record()) {
    $poptf = 1;
}
$fcco->free_result();
$plflag1 = 0;
if ($poptf) {
    $plflag1 |= (int) $flag_hasoption;
}
$fccr = new FC_SQL();
$fccr->query("update prodlang set prodlflag1={$plflag1} where prodlsku='{$ssku}'" . " and prodlzid={$zoneid} and prodlid={$langid}");
$fccr->commit();
//set the prodlflag correctly   bvo
?>

<p>

<?php 
if ($act == 'update' || $act == 'delete') {
    ?>
Example #25
0
require './admin.php';
require './header.php';
$droot = "BITCART_PKG_PATH";
if ($zoneid == 0) {
    ?>
	Please click the &quot;Back&quot; button on your browser
	and select a default zone.  Thank you.
    <?php 
    exit;
}
$fcm = new FC_SQL();
$fcm->Auto_commit = 0;
$fcm->query("select count(*) as cnt from master");
$fcm->next_record();
if ($fcm->f("cnt") > 0) {
    $fcm->free_result();
    $res = $fcm->query("update master set zoneid={$zoneid}");
} else {
    $res = $fcm->query("insert into master (zoneid) values ({$zoneid})");
}
if (!$res) {
    $fcm->rollback();
    echo "<b>Failure updating master: {$res}</b><br>\n";
} else {
    $fcm->commit();
    echo "Work Committed.<br>\n";
}
?>

<p>
Example #26
0
     // show the customer record
     echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>Billing Information</b><p>\n";
     echo $fccust->f("custbsal") . ' ' . $fccust->f("custbfname") . ' ' . $fccust->f("custbmname") . ' ' . $fccust->f("custblname") . "<br>\n" . $fccust->f("custbaddr1") . "<br>\n" . $fccust->f("custbaddr2") . "<br>\n" . $fccust->f("custbcity") . ', ' . $fccust->f("custbstate") . ' ' . $fccust->f("custbzip") . '-' . $fccust->f("custbzip4") . ' ' . $fccust->f("custbnatl") . "<br>\n" . $fccust->f("custbacode") . ' ' . $fccust->f("custbphone") . "<br>\n" . $fccust->f("custbemail") . "<br>\n";
     echo "</td><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>Shipping Information</b><p>\n";
     echo $fccust->f("custssal") . ' ' . $fccust->f("custsfname") . ' ' . $fccust->f("custsmname") . ' ' . $fccust->f("custslname") . "<br>\n" . $fccust->f("custsaddr1") . "<br>\n" . $fccust->f("custsaddr2") . "<br>\n" . $fccust->f("custscity") . ', ' . $fccust->f("custsstate") . ' ' . $fccust->f("custszip") . '-' . $fccust->f("custszip4") . ' ' . $fccust->f("custsnatl") . "<br>\n" . $fccust->f("custsacode") . ' ' . $fccust->f("custsphone") . "<br>\n" . $fccust->f("custsemail") . "<br>\n";
     echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>IP Address:</b>\n";
     echo "</td><td valign=top colspan=2 bgcolor=\"#FFFFFF\">" . $fcohead->f('oheadcustip') . "\n";
     echo "</td></tr>\n";
     echo "</td></tr>\n";
     echo "<tr><td valign=top colspan=4 align=center bgcolor=\"#FFFFFF\"><b>Credit Information</b></td></tr>\n";
     echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\">\n";
     echo '<b>CC Name</b><br>' . '<b>CC Number</b><br>' . '<b>CC Type</b><br>' . '<b>CC Expiration</b><br>';
     echo "</td><td valign=top colspan=2 bgcolor=\"#FFFFFF\">\n";
     echo $fccust->f("custccname") . "<br>\n" . $fccust->f("custccnumber") . "<br>\n" . $fccust->f("custcctype") . "<br>\n" . $fccust->f("custccexpmo") . '/' . $fccust->f("custccexpyr") . "<br>\n";
     echo "</td></tr>\n";
     $fccust->free_result();
 }
 $fcoline->query("select * from oline where orderid='{$orderid}'");
 if (!$fcoline->next_record()) {
     echo '<tr><td align=center valign=middle colspan=4 bgcolor="#FFFFFF">' . 'No order detail records found.<p>' . "</td></tr>\n";
 } else {
     // show the order detail items
     echo "<tr><td bgcolor=\"#FFFFFF\"><b>SKU</b>" . "</td><td bgcolor=\"#FFFFFF\"><b>Composite SKU</b>" . "</td><td bgcolor=\"#FFFFFF\"><b>Quantity</b>" . "</td><td bgcolor=\"#FFFFFF\"><b>Price</b>" . "</td></tr>\n";
     do {
         echo "<tr><td bgcolor=\"#FFFFFF\">" . $fcoline->f("sku") . "</td><td bgcolor=\"#FFFFFF\">" . $fcoline->f("compsku") . "</td><td align=right bgcolor=\"#FFFFFF\">" . $fcoline->f("qty") . "</td><td align=right bgcolor=\"#FFFFFF\">" . sprintf("%.2f", $fcoline->f("olprice")) . "</td></tr>\n";
     } while ($fcoline->next_record());
     $fcoline->free_result();
 }
 echo "<tr><td valign=top bgcolor=\"#FFFFFF\">" . '<b>Product Subtotal</b><br></td>' . '<td valign=top align=right bgcolor="#FFFFFF">' . sprintf("%.2f", (double) $fcohead->f("pstotal")) . '<br></td>' . '<td valign=top bgcolor="#FFFFFF"><b>Shipping</b><br></td>' . '<td valign=top align=right bgcolor="#FFFFFF">' . sprintf("%.2f", (double) $fcohead->f("shamt")) . '<br>' . "</td></tr>\n";
 echo "<tr><td valign=top bgcolor=\"#FFFFFF\">" . '<b>Donation</b><br></td>' . '<td valign=top align=right bgcolor="#FFFFFF">' . sprintf("%.2f", (double) $fcohead->f("contrib")) . '<br></td>' . '<td valign=top bgcolor="#FFFFFF"><b>Total</b><br></td>' . '<td valign=top align=right bgcolor="#FFFFFF">' . sprintf("%.2f", (double) $fcohead->f("ototal")) . '<br>' . "</td></tr>\n";
 $fcohead->free_result();
Example #27
0
                $subdescr = stripslashes($subcats->f("catmast"));
                print "<tr><td><a href=\"display.php?cat={$catvl}&zid={$zid}&lid={$lid}&cartid={$cartid}\">";
                if ($catlogo != '') {
                    print "<img src=\"{$catlogo}\" alt=\"{$subdescr}\" border=\"1\">";
                }
                print "<br>{$subdescr}</a><br /><br /></td></tr>\n";
                // new line if across page has been reached
                if ($across == $cats_across) {
                    // print "</tr>\n<tr>";
                    // reset across page counter;
                    $across = 0;
                }
            }
            //close table
            print '</table><table width="500" border="0">';
            $subcats->free_result();
        }
        // end are there any subcats to display? IF not, don't do anything more
        // end get subcat level under $cat and spit them out in a table
        ?>
 
<?php 
        // main product display table; only show if there are products
        if ($count) {
            ?>
<table cellpadding="0" width="500" border="0">

<?php 
            // show the clickable search results bar
            if (empty($dn)) {
                $dn = 5;
Example #28
0
    echo "sorry, we don't know the address entered";
    exit;
}
if ($wwkwijt->f("pwactive") == "0") {
    //login is not active so we're supposed to build an errormessage here
    //let's keep it simple for now
    //this will be fixed in the next release
    echo 'account is currently not active';
    exit;
}
$login = $wwkwijt->f("pwuid");
$ww = $wwkwijt->f("pwpw");
//record found now sending email
$subject .= "Information you requested from ";
$messages .= "Your  catalog password:\n";
$messages .= "username : {$login}\n";
$messages .= "password : {$ww}\n";
$headers .= "From: " . $gBitSystem->getSenderEmail() . "\n";
$headers .= "Return-Path: <" . $gBitSystem->getSenderEmail() . ">\n";
mail($wwkwijt->f("pwemail"), $subject, $messages, $headers);
$wwkwijt->free_result();
?>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<a href="index.php">login with password</a>
</BODY>
</HTML>
Example #29
0
<a href="index.php?zoneid=<?php 
echo $zoneid;
?>
&langid=<?php 
echo $langid;
?>
" onClick="closehelp()">Return To Central Maintenance Page</a><br>

</td></tr>

<?php 
$fckey = new FC_SQL();
$fckey->query("select count(*) as cnt from keyword");
$fckey->next_record();
$ktotal = $fckey->f("cnt");
$fckey->free_result();
?>

<tr><td align=left valign=top colspan=1 bgcolor=#ffffff>
<i>Total keywords logged: <?php 
echo $ktotal;
?>
</i>
<p>

Number of Keywords to View:<br>
<i>0 for all keywords</i><br>
<form method=post action="keyqueryrslt.php">
<input name=numkeys size=4>
<input type=hidden name=zoneid value=<?php 
echo $zoneid;
Example #30
0
// Causes preview.php to not be shown
$nukepreview = 1;
// get the language information
$fcl = new FC_SQL();
$fcl->query("select langtdsp,langshow,langterr,langcopy,langterms from lang " . "where langid={$lid}");
$fcl->next_record('langterms');
$show = $fcl->f("langshow");
$copy = $fcl->f("langcopy");
$lterms = $fcl->f("langterms");
$fcl->free_result();
$fcsz = new FC_SQL();
$fcsz->query("select count(*) as cnt from subzone " . "where subzid={$zid} and subzparent={$subzparent}");
$fcsz->next_record();
$zt = $fcsz->f("cnt");
if ($zt == 1 && !($zflag1 & $flag_zonezipshowgeo)) {
    $fcsz->free_result();
    // if only one shipping zone, default it.
    $fcsz->query("select subzid,subzsid,subzdescr from subzone " . "where subzid={$zid} and subzparent={$subzparent}");
    $fcsz->next_record();
    $cat = (string) $cat;
    $szid = (int) $fcsz->f("subzsid");
    $fcsz->free_result();
    $fcsz->query("update ohead set subz={$szid},shipid=0 where orderid='{$cartid}'");
    $fcsz->commit();
    header("Location: {$nsecurl}{$cartdir}/{$show}?cartid={$cartid}&zid={$zid}" . "&lid={$lid}&olimit={$olimit}&nlst={$nlst}&olst={$olst}&key1={$key1}" . "&cat={$cat}&szid={$szid}&oszid={$szid}&option_violation={$option_violation}&" . "return_product={$return_product}");
    exit;
}
if ($zflag1 & $flag_zonezipshowgeo) {
    $fcsz->query("select scity,sstate,szip,scountry from ohead where\n\torderid='{$cartid}'");
    if ($fcsz->next_record()) {
        $city = stripslashes($fcsz->f("scity"));