Location: PHPKode > projects > Esvon Personals > esvon-personals/tpl/admin/cat_win.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>

<title>Select Category</title>

<link rel="stylesheet" href="../img/admin/styles.css" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=##CHARSET##">

<script language="JavaScript"><!--

function PageQuery(q) {

  if(q.length > 1) this.q = q.substring(1, q.length);
  else this.q = null;
  this.keyValuePairs = new Array();
  if(q) {
    for(var i=0; i < this.q.split("&").length; i++) this.keyValuePairs[i] = this.q.split("&")[i];
  }

this.getKeyValuePairs = function() { return this.keyValuePairs; }

this.getValue = function(s) {
  for(var j=0; j < this.keyValuePairs.length; j++) {
    if(this.keyValuePairs[j].split("=")[0] == s) return unescape(this.keyValuePairs[j].split("=")[1]);
  }
  return false;
}

this.getParameters = function() {
  var a = new Array(this.getLength());
  for(var j=0; j < this.keyValuePairs.length; j++) a[j] = this.keyValuePairs[j].split("=")[0];
  return a;
}

this.getLength = function() { return this.keyValuePairs.length; } 

}

setTimeout("closeOrphanWindow()", 2000);

function closeOrphanWindow() {
  try {
    eval('window.opener.document');
  }
  catch(e){
    window.close();
    return;
  }
  setTimeout("closeOrphanWindow()", 2000);
}

function selectCat(){

   closeOrphanWindow();

   var cid;
   var cat_menu = document.frm.cid;

   if(cat_menu.options) cid = cat_menu.options[cat_menu.selectedIndex].value;
   else cid = cat_menu.value;

   var pg = new PageQuery(window.location.search); 

   var sAct = pg.getValue('act');

   if(sAct==''){}
   else if(sAct=='redir'){} {
     var sUrl = pg.getValue('url');
     if(sUrl) window.opener.document.location = sUrl + cid;
   }

//   var cname = cat_menu.options[cat_menu.selectedIndex].text;
//   window.opener.document.frm.cid.value = cid;

   window.close();

}

//--></script>

</HEAD>

<BODY>

<center>

<form name=frm method=post>

<p class=ag_adm>Select Category:</p>

##cat_menu##

<p>

<input type=button value="Select" OnClick="selectCat()" class=button>
<input type=button value="Cancel" OnClick="window.close()" class=button>

</form>

</center>

</BODY>

</html>
Return current item: Esvon Personals