Пример #1
0
	margin-left:2px;
	margin-right:2px;
	margin-top:2px;
	margin-bottom:2px; 
	border-style: solid; 
	border-width:thin;
	padding = 2px 2px 2px 2px;
	background-color = #F5BF9C;
	font-family:Verdana;
		font-size:12px;
}

</style>
<?php 
include 'Services/ItemServices.php';
$attrStr = allAttributes();
echo "\n<SCRIPT language='javascript'>\nvar classStr=\"" . $classStr . "\";\n";
echo "attrStr = \"" . $attrStr . " \";\n ";
echo "</SCRIPT>";
?>
 
 <script>
 /* ATTRIBUTEs */
function loadAttrs(){
	var attributes = attrStr.split(";");
	var attrId;
	var attrName;
	var opt ;
	var attrSel =  document.getElementById("attrSel");
	attrSel.length = 0;
	for(var i=0;i<attributes.length;i++){
Пример #2
0
/*
 * Created on 07-Dec-08 Naren
 * All Services related to items (products) 
 */
include 'DBServices.php';
allClassifications();
$action = $_REQUEST['action'];
/* Ajax services */
if ($action == "addNewAttr") {
    $newAttr = $_REQUEST['addNewAttr'];
    $qry = "insert into attributes values (null,\"" . $newAttr . "\");";
    //echo "QRY ".$qry;
    $res = executeQuery($qry);
    //echo "DONE";
    echo allAttributes();
}
/* Ajax services end*/
/* Submission, action and URL redirection */
$action = $_REQUEST["action"];
if ($action == "addNewItem") {
    var_dump($_REQUEST);
    addNewItem();
}
if ($action == "updateItem") {
    var_dump($_REQUEST);
    updateItem();
}
/* Submission, action and URL redirection - end*/
function allClassifications()
{