show menu"; }else{ $menushow = "hide menu"; } echo $menushow; */ $foliodomain="."; //if($menu<>"0"){ echo "
"; //echo "
1.
"; //$itemlist = array('news', 'pages','styles','comments','categories', 'files', 'folders', 'keywords', 'links', 'persons', 'groups', 'areas', 'roles', 'permissions','companies', 'addresses', 'sessions', 'baskets', 'deliveries', 'items','suppliers','products', 'materials', 'colors', 'palettes', 'stock', 'brands', 'events', 'todo', 'values', 'binder', 'log', 'stats', 'statrules', 'feeds', 'shelves'); global $curUser; $isGOD=CheckGOD($curUser); if ($isGOD>0){ $itemlist = array('news', 'pages','styles','comments','categories', 'files', 'folders', 'keywords', 'links', 'feeds', 'persons', 'sessions', 'palettes', 'hours','binder'); } else { $itemlist = array('news', 'pages', 'comments','categories', 'files', 'folders', 'keywords', 'links', 'binder'); } //$itemlist = array('news', 'categories', 'files', 'folders', 'links', 'binder'); $i=0; foreach ($itemlist as $item) { if (isset($f)){ if($f==$item){$SELECTED="_SELECTED";}else{$SELECTED="";} } echo "

$item
"; $i++; } //echo "
2.
"; //$itemlist2 = array('tools', 'upload', 'filegrab', 'folderscan', 'thumbnails', 'backupdb', 'search', 'clean', 'reset', 'help', 'about', 'optimize', 'seed','newswizard','keywordwizard', 'colorextract', 'itemwizard', 'bindcount', 'groupwizard', 'statscount', 'linkcheck', 'rssfeeds', 'itemqueue', 'bindview', 'fillshelf', 'openinghours'); if ($isGOD>0){ $itemlist2 = array('folderscan', 'backupdb', 'search', 'about', 'newswizard', 'thumbnails', 'keywordwizard', 'bindcount', 'linkcheck', 'openinghours'); } else { $itemlist2 = array('folderscan', 'backupdb', 'search', 'about', 'newswizard','keywordwizard', 'bindcount', 'linkcheck', 'openinghours'); } //$itemlist2 = array('upload', 'filegrab', 'folderscan', 'thumbnails','newswizard'); echo "
"; echo "
"; $i=0; foreach ($itemlist2 as $item) { if (isset($f)){ if($f==$item){$SELECTED="_SELECTED";}else{$SELECTED="";} } echo "

$item
"; $i++; } echo "
"; //} //end if menu show echo "
"; if (isset($f)){ //echo "you seem to have pushed $f
"; switch ($f){ //SETTINGS case "about": include ('./settings/setting_about.php'); break; case "help": include ('./settings/setting_help.php'); break; //TOOLS case "search": include ('./tools/tool_search.php'); break; case "colorextract": include ('./tools/tool_colorextract.php'); break; case "itemwizard": include ('./tools/tool_itemwizard.php'); break; case "backupdb": include ('./tools/tool_backupdb.php'); break; case "upload": include ('./tools/tool_upload.php'); break; case "linkcheck": include ('./tools/tool_linkcheck.php'); break; case "rssfeeds": include ('./tools/tool_rssfeeds.php'); break; case "itemqueue": include ('./tools/tool_itemqueue.php'); break; case "tools": include ('./tools/tool_tools.php'); break; case "fillshelf": include ('./tools/tool_fillshelf.php'); break; case "groupwizard": include ('./tools/tool_groupwizard.php'); break; case "folderscan": include ('./tools/tool_folderscan.php'); break; case "optimize": include ('./tools/tool_optimize.php'); break; case "bindview": include ('./tools/tool_bindview.php'); break; case "clean": include ('./tools/tool_clean.php'); break; case "reset": include ('./tools/tool_reset.php'); break; case "seed": include ('./tools/tool_seed.php'); break; case "statscount": include ('./tools/tool_statscount.php'); break; case "keywordwizard": include ('./tools/tool_keywordwizard.php'); break; case "newswizard": include ('./tools/tool_newswizard.php'); break; case "filegrab": include ('./tools/tool_filegrab.php'); break; case "thumbnails": include ('./tools/tool_thumbnails.php'); break; case "bindcount": include ('./tools/tool_bindcount.php'); break; case "openinghours": include ('./tools/tool_openinghours.php'); break; //TABLES default: switch ($a){ /* case "show_change": $f=$_POST['f']; $thisid=$_POST['id']; $show=$_POST['show']; //connect to db require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); mysql_query("UPDATE $f SET show=$show WHERE id='$thisid'"); echo "

Item $thisid from table $f has been changed

"; break; */ case "delete": $thisid=$_GET['id']; echo "

Item $thisid from table $f has been deleted

"; echo ""; //connect to db require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); if ($f=="files"){ $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."files WHERE id='$thisid'"); $resultrow=mysql_fetch_array($result); $folderid=$resultrow[folderid]; $file="$resultrow[file]"; $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."folders WHERE id='$folderid'"); $resultrow=mysql_fetch_array($result); $mydir="$foliodomain/files/$resultrow[folder]"; unlink($mydir."/".$file); echo ""; //update the folderinfo folderscan($mydir); echo ""; } if ($f=="folders"){ //remove corresponding files from binder $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."files WHERE folderid='$thisid'"); while($resultrow=mysql_fetch_array($result)){ $fileid=$resultrow[id]; mysql_query("DELETE FROM ".$globalConfig['dbprefix']."binder WHERE table1='files' AND record1='$fileid'"); mysql_query("DELETE FROM ".$globalConfig['dbprefix']."binder WHERE table2='files' AND record2='$fileid'"); } echo ""; //remove all files for folderid mysql_query("DELETE FROM ".$globalConfig['dbprefix']."files WHERE folderid=$thisid"); echo ""; //get folder location $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."folders WHERE id='$thisid'"); $resultrow=mysql_fetch_array($result); $mydir="$resultrow[folder]"; //remove folder and its contents physically RemoveDirectory($mydir); echo ""; //echo ""; //optimize table mysql_query("OPTIMIZE TABLE files"); echo ""; } //delete folder mysql_query("DELETE FROM ".$globalConfig['dbprefix']."folders WHERE folder='$mydir'"); mysql_query("OPTIMIZE TABLE folders"); //delete db entry mysql_query("DELETE FROM ".$globalConfig['dbprefix']."$f WHERE id=$thisid"); echo ""; //optimize table mysql_query("OPTIMIZE TABLE $f"); echo ""; //remove all links in the binder mysql_query("DELETE FROM ".$globalConfig['dbprefix']."binder WHERE table1='$f' AND record1='$thisid'"); echo ""; mysql_query("DELETE FROM ".$globalConfig['dbprefix']."binder WHERE table2='$f' AND record2='$thisid'"); echo ""; //optimize table mysql_query("OPTIMIZE TABLE ".$globalConfig['dbprefix']."binder"); echo ""; echo "
message
#actual file $file from $mydir deleted from harddisk
#folder information for $resultrow[folder] updated
#all files out of this folder removed from binder
#all file entries out of this folder removed
#actual folder and all its files removed from harddisk
#$removeaction
#table files optimized
#item $thisid deleted from table $f
#table ".$globalConfig['dbprefix']."$f optimized
#item $thisid from table $f removed from binder masters
#item $thisid from table $f removed from binder slaves
#table binder optimized
"; echo "
click here to go back to $f"; break; case "comment": global $dblang, $lang, $cat, $page, $mode, $news, $dbname, $ezdb, $globalConfig, $userid, $sessionid, $admin, $f, $Fname, $Fvalue; $posttable=$_POST['posttable']; $postrecord=$_POST['postrecord']; $postcom=$_POST['postcom']; $postvote=$_POST['postvote']; $ezdb->query("INSERT INTO ".$globalConfig['dbprefix']."comments VALUES (NULL, NOW(), '0', '1', '$postcom', '$postvote', '$sessionid', '$userid')"); $varid=$ezdb->get_var("SELECT id FROM ".$globalConfig['dbprefix']."comments WHERE comment='$postcom' AND vote='$postvote' AND sessionid='$sessionid' AND userid='$userid' "); $ezdb->query("INSERT INTO ".$globalConfig['dbprefix']."binder VALUES (NULL, NOW(), '0', '1', '$posttable', '$postrecord', 'comments', '$varid', '', '', '$userid')"); echo "

Comment

"; echo "

Your comment has been added.

"; echo " return

"; break; case "edit": echo "

We will edit record $id from table $f

"; echo " cancel

"; //connect to database require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); $jobs=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."$f WHERE id='$id' LIMIT 1"); //make form to submit changes echo "
"; echo ""; //echo "we're trying"; $fieldnames = array(); while ($fields=@mysql_fetch_field($jobs)) { $fieldnames[]=$fields->name; } while($jobs_row = mysql_fetch_array($jobs)) { $fieldstotal = mysql_num_fields($jobs); //echo "we're still trying"; //generate editable list of fields for this record //for ($x=0; $x<@mysql_num_fields($jobs_row); $x++) { echo ""; for ($x=0; $x<$fieldstotal; $x++) { $fields=@mysql_fetch_field($jobs[$x][0]); if ($fieldnames[$x]=="public"){ if ($jobs_row[$x]==1){$checked=" checked=\"checked\"";}else{$checked="";} echo (""); //if not god also hide these }elseif(($isGOD<1) && (($fieldnames[$x]=="file") OR ($fieldnames[$x]=="folder"))){ echo (""); }elseif(($fieldnames[$x]=="type") OR ($fieldnames[$x]=="id") OR ($fieldnames[$x]=="posted") OR ($fieldnames[$x]=="userid") OR ($fieldnames[$x]=="updated") OR ($fieldnames[$x]=="bound") OR ($fieldnames[$x]=="sessionid") OR ($fieldnames[$x]=="folderid") OR ($fieldnames[$x]=="files") OR ($fieldnames[$x]=="size") OR ($fieldnames[$x]=="lastlog") OR ($fieldnames[$x]=="session") OR ($fieldnames[$x]=="pagecount") OR ($fieldnames[$x]=="duration") OR ($fieldnames[$x]=="ipaddress") OR ($fieldnames[$x]=="hostname") OR ($fieldnames[$x]=="referrer")){ echo (""); }elseif(($fieldnames[$x]=="text_uk") OR ($fieldnames[$x]=="text_jp")){ echo (""); }elseif($fieldnames[$x]=="sort_jp"){ //now give a dropdown list echo ""; }else{ echo (""); } } echo "
fieldvalue
".$fieldnames[$x]."
".$fieldnames[$x]."".$jobs_row[$x]."
".$fieldnames[$x]."".$jobs_row[$x]."
".$fieldnames[$x]."
".$fieldnames[$x].""; echo "
".$fieldnames[$x]."
"; } echo ""; echo ""; echo "
"; break; case "update": require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); $total=$_POST['total']; $thisid=$_POST['update'][0]; $f=$_POST['f']; $a=$_POST['a']; echo "

Updated $thisid in $f

"; /* $realtotal1=count($_POST['fieldname']); $realtotal2=count($_POST['update']); echo "$realtotal1 | $realtotal2"; */ $updatequery="UPDATE ".$globalConfig['dbprefix']."$f SET id=id"; echo ""; $j=2; //we use $j for fieldvalues since unchecking the checkbox leaves a void for( $i=2;$i<$total;$i++) { $fieldname=$_POST['fieldname'][$i]; $fieldvalue=$_POST['update'][$j]; $fieldvalue=trim($fieldvalue); $fieldvalue=preg_replace('//i', '', $fieldvalue); $fieldvalue=nl2br($fieldvalue); //keep line breaks //$fieldvalue=addslashes($fieldvalue); //$fieldvalue=nl2br($fieldvalue); //keep line breaks if ($fieldname=="public"){ if ($fieldvalue=="on"){ $fieldname="public"; $fieldvalue=1; }else{ $fieldname="public"; $fieldvalue=0; $j=$j-1; } } if ($fieldname=="file"){ //get old file name $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."files WHERE id='$thisid'"); $resultrow=mysql_fetch_array($result); $file="$resultrow[file]"; $folderid=$resultrow[folderid]; $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."folders WHERE id='$folderid'"); $resultrow=mysql_fetch_array($result); $folder=$resultrow[folder]; $mydir="$foliodomain/files/$folder/"; $newfile="$fieldvalue"; $oldfile="$file"; rename ($mydir.$oldfile,$mydir.$newfile); } //if (($fieldname=="text_uk") || ($fieldname=="text_jp")){ //} if ($fieldname=="updated"){ $fieldvalue = date("Y-m-d H:i:s", Time()); echo $datemodified; //$updatequery.=", $fieldname='$datemodified' "; } if ($fieldname=="folder"){ $newfolder="$foliodomain/files/$fieldvalue"; //get old folder name //get folder id $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."folders WHERE id='$thisid'"); $resultrow=mysql_fetch_array($result); $oldfolder=$resultrow[folder]; $oldfolder="$foliodomain/files/$oldfolder"; //rename folder rename ($oldfolder,$newfolder); } //$mysqlstring = "UPDATE $f SET posted=NULL"; echo ""; $updatequery.=", $fieldname='$fieldvalue' "; $j++; } echo "
fieldnamevalue
$fieldname$fieldvalue
"; //updating one by one since it's the only thing that seems to work for now $updatequery.=" WHERE id='$thisid'"; mysql_query($updatequery); //echo $updatequery."
"; echo "
click here to go back to $f"; echo "
click here to edit $thisid in $f"; break; case "new": echo "

Post a new item for $f

"; $colorpicker=0; //color picker has not been printed yet, only print one time echo " cancel

"; //connect to database // requires the class require "./classes/datepicker/class.datepicker.php"; require "./classes/folio_color_picker/color_picker.php"; require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); $jobs=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."$f LIMIT 1"); //make form to submit changes echo "
"; echo ""; //echo "we're trying"; $fieldstotal = mysql_num_fields($jobs); //echo "
$fieldstotal"; $fieldnames = array(); while ($fields=@mysql_fetch_field($jobs)) { $fieldnames[]=$fields->name; } //echo "we're still trying"; //generate editable list of fields for this record //for ($x=0; $x<@mysql_num_fields($jobs_row); $x++) { echo ""; for ($x=0; $x<$fieldstotal; $x++) { $fields=@mysql_fetch_field($jobs[$x][0]); if (($fieldnames[$x]=="id") OR ($fieldnames[$x]=="posted") OR ($fieldnames[$x]=="updated") OR ($fieldnames[$x]=="bound") OR ($fieldnames[$x]=="userid")){ echo (""); } elseif ($fieldnames[$x]=="sessionid"){ $session=session_id(); $sessionquery=mysql_query("SELECT * FROM ".$dbprefix."sessions WHERE session='$session'"); $sessionqueryrow=mysql_fetch_array($sessionquery); $sessionid=$sessionqueryrow['id']; echo (""); } elseif (($fieldnames[$x]=="table1") OR ($fieldnames[$x]=="table2")){ //now give a dropdown list with table names as defined in $itemlist echo ""; }elseif($fieldnames[$x]=="sort_jp"){ //now give a dropdown list echo ""; } elseif (($fieldnames[$x]=="field1") OR ($fieldnames[$x]=="field2") OR ($fieldnames[$x]=="field3")){ //now give a dropdown list with table names as defined in $itemlist echo ""; } elseif (($fieldnames[$x]=="op1") OR ($fieldnames[$x]=="op2")){ //now give a dropdown list with table names as defined in $itemlist echo ""; } elseif ($fieldnames[$x]=="statact"){ //now give a dropdown list with table names as defined in $itemlist echo ""; } elseif ($fieldnames[$x]=="brandid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="productid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="areaid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="roleid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="hierarchy"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="hierarchyid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="personid"){ //now give a dropdown list with brand names echo ""; } elseif ($fieldnames[$x]=="groupid"){ //now give a dropdown list with brand names echo ""; } elseif (($fieldnames[$x]=="datefrom") OR ($fieldnames[$x]=="dateto")) { // instantiate the object $db=new datepicker(); // uncomment the next line to have the calendar show up in german //$db->language = "dutch"; $db->firstDayOfWeek = 1; // set the format in which the date to be returned $db->dateFormat = "Y-m-d"; echo ""; } elseif ($fieldnames[$x]=="public"){ echo (""); } elseif (($fieldnames[$x]=="text_uk") || (($fieldnames[$x]=="text_jp"))){ echo ""; //colors } elseif (($fieldnames[$x]=="col_1") || (($fieldnames[$x]=="col_2")) || (($fieldnames[$x]=="col_3")) || (($fieldnames[$x]=="col_4")) || (($fieldnames[$x]=="col_5"))){ echo ""; } else { echo (""); } } echo "
fieldvalue
".$fieldnames[$x]."auto
".$fieldnames[$x]."auto
".$fieldnames[$x].""; echo "
".$fieldnames[$x].""; echo "
".$fieldnames[$x].""; echo "
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x].""; ?> "> yyyy-mm-dd hh:mm:ss
".$fieldnames[$x]."
".$fieldnames[$x]."
".$fieldnames[$x].""; echo "
"; if ($colorpicker=="0"){ echo "
"; $colorpicker=1; } echo"
".$fieldnames[$x]."
"; echo ""; echo ""; echo "
"; break; case "insert": echo "

New item added in $f.

"; $total=$_POST['total']-1; $userid=GetUserId($curUser); $mysqlstring = ""; echo ""; for( $i=3;$i<$total;$i++) { //$fieldvalue=isUTF8($_POST['insert'][$i]); //$fieldvalue=utf8_decode($_POST['insert'][$i]); $fieldvalue=$_POST['insert'][$i]; if (($fieldname=="text_uk") || ($fieldname=="text_jp")){ //keep line breaks $fieldvalue = nl2br ( $fieldvalue ); } echo ""; $mysqlstring.=",'".$fieldvalue."'"; //if it's a folder, also create the actual folder if (($f=="folders") AND ($_POST['fieldname'][$i]=="folder")){ $folderpath="$foliodomain/files/$fieldvalue"; mkdir($folderpath); chmod($folderpath,0777); } } echo "
fieldnamevalue
".$_POST['fieldname'][$i]."".$fieldvalue."
"; echo "
click here to go back to $f"; echo "
post a new item in $f"; //echo "
$mysqlstring"; //connect to database global $globalConfig; $dbname=$globalConfig['dbname']; $dbprefix=$globalConfig['dbprefix']; require ("./include/connect_db.php"); mysql_select_db($dbname, $link) or die("couldn't select database"); mysql_query("INSERT INTO ".$dbprefix."$f VALUES(NULL,NOW(),'' $mysqlstring ,'$userid')"); //echo "
DB UPDATED"; $lastid=$ezdb->get_var("SELECT id FROM ".$globalConfig['dbprefix']."$f ORDER BY id DESC LIMIT 1"); echo "
click here to edit $lastid in $f"; break; default: echo "

Overview of $f

"; //CountBindingsTable($f); if( ($f<>"files") AND ($f<>"sessions") AND ($f<>"stats") AND ($f<>"log") ){ echo " post a new item in $f

"; } $db=new mysql_dialog("1"); $db->connect($globalConfig['dbhost'],$globalConfig['dbuser'], $globalConfig['dbpass'], $globalConfig['dbname']); //FILTER $Fname=$_GET['Fname']; $Fvalue=$_GET['Fvalue']; if ((isset($Fname)) AND (isset($Fvalue)) AND ($Fname<>NULL) AND ($Fvalue<>NULL)){ $condition="WHERE $Fname='$Fvalue'"; } else { $condition=""; } //PAGINATION $page=$_GET['page']; $perpage=$globalConfig['adminperpage']; //pagination buttons $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."$f $condition"); $totalrows=mysql_num_rows($result); $pages=ceil($totalrows/$perpage); echo "items: $totalrows | "; for( $i=1;$i<=$pages;$i++) { echo "page $i | "; } //pagination filter if (isset($page)){ $offset=($page*$perpage)-$perpage; $pagination="LIMIT $perpage OFFSET $offset"; }else{ $pagination="LIMIT $perpage"; } //SORT $Sname=$_GET['Sname']; $Svalue=$_GET['Svalue']; if ((isset($Sname)) AND (isset($Svalue)) AND ($Sname<>NULL) AND ($Svalue<>NULL)){ $sorting="ORDER BY $Sname $Svalue"; } else { $sorting="ORDER BY id DESC"; } //CountBindings($f, $Fvalue); $SQL="SELECT * FROM ".$globalConfig['dbprefix']."$f $condition $sorting $pagination"; $db->speak($SQL); $db->onscreen($SQL); if(isset($f) AND ($Fname=="id")){ echo "
"; //bind wizard block $bindsingle=AdminBindSingle($f, $Fvalue); echo "
Bind:

$bindsingle

"; //related block $related=AdminGetRelated($f, $Fvalue); echo "
Related:

$related

"; //detail block $details=AdminGetDetails($f, $Fvalue); echo "
Details:

$details

"; /* //comment block $comment=AdminAllowComments($f, $Fvalue); echo "
Comment:

$comment

"; */ /* //value block $value=AdminAllowValues($f, $Fvalue); echo "
Value:

$value

"; echo "
"; //end recorddetailview */ } break; }//ending the switch a } //ending the switch f echo "
"; //ending page_middle } else { echo "

Welcome to the Folio CMS admin section. Please select from menu."; echo ""; //ending page_middle } /** * Returns true if the string or array of string is encoded in UTF8. * * Example of use. If you want to know if a file is saved in UTF8 format : * $array = file('one file.txt'); * $isUTF8 = isUTF8($array); * if (!$isUTF8) --> we need to apply utf8_encode() to be in UTF8 * else --> we are in UTF8 :) * * @param mixed A string, or an array from a file() function. * @return boolean */ function isUTF8($string) { if (is_array($string)) { $enc = implode('', $string); return @!((ord($enc[0]) != 239) && (ord($enc[1]) != 187) && (ord($enc[2]) != 191)); } else { return (utf8_encode(utf8_decode($string)) == $string); } } function MovePantone(){ $dbprefix="folio_"; require ("./include/connect_db.php"); mysql_select_db($globalConfig['dbname'], $link) or die("couldn't select database"); mysql_query("UPDATE ".$globalConfig['dbprefix']."colors SET hex=trim(hex)"); $result=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."colors WHERE pms<>''"); while($resultrow=mysql_fetch_array($result)){ $pmsvalue=$resultrow[pms]; $hexvalue=$resultrow[hex]; $oldid=$resultrow[id]; echo $pmsvalue." ".$hexvalue." ".$oldid; $result2=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."colors WHERE hex='$hexvalue' AND id<>$oldid"); if(mysql_num_rows($result2)>0){ mysql_query("UPDATE ".$globalConfig['dbprefix']."colors SET pms='$pmsvalue' WHERE hex='$hexvalue' AND id<>$oldid"); echo " move and delete
"; mysql_query("DELETE FROM ".$globalConfig['dbprefix']."colors WHERE id='$oldid' LIMIT 1"); } else { echo " keep
"; } } } ?>