thanks djr33
well,
Here i added <? echo $var ?> , and then renamed ssmItems.js into ssmItems.php
PHP Code:
// ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
ssmItems[0]=["Menu"] //create header
ssmItems[1]=["<? echo $var ?>", "", ""]
ssmItems[2]=["What's New", "http://www.dynamicdrive.com/new.htm",""]
ssmItems[3]=["What's Hot", "http://www.dynamicdrive.com/hot.htm", ""]
ssmItems[4]=["Message Forum", "http://www.codingforums.com", "_new"]
ssmItems[5]=["Submit Script", "http://www.dynamicdrive.com/submitscript.htm", ""]
ssmItems[6]=["Link to Us", "http://www.dynamicdrive.com/link.htm", ""]
ssmItems[7]=["FAQ", "http://www.dynamicdrive.com/faqs.htm", "", 1, "no"] //create two column row
ssmItems[8]=["Email", "http://www.dynamicdrive.com/contact.htm", "",1]
ssmItems[9]=["External Links", "", ""] //create header
ssmItems[10]=["JavaScript Kit", "http://www.javascriptkit.com", ""]
ssmItems[11]=["Freewarejava", "http://www.freewarejava.com", ""]
ssmItems[12]=["Coding Forums", "http://www.codingforums.com", ""]
buildMenu();
//-->
this is my php code,
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>LiveZilla - Operator Box</title>
</head>
<body>
<table cellspacing="5" style="font-family:verdana,arial;font-size:10px;border:solid 1px gray;background:#eff2f3;">
<?php
define("LIVEZILLA_PATH","./../");
require("./../api.php");
$API = new LiveZillaAPI();
foreach($API->GetOperators() as $operator)
{
if(!$operator->InExternalGroup)
continue;
echo "<tr>";
echo "<td valign=\"top\">";
echo "<img src=\"". LIVEZILLA_PATH . $operator->GetOperatorPictureFile() ."\" width=\"60\" height=\"45\" style=\"border:solid 1px gray;\">";
echo "</td>";
echo "<td valign=\"top\">";
echo "<b>" . utf8_decode($operator->Fullname) . "</b><br>". utf8_decode($operator->Description) ."<br>Status: ";
if($operator->Status == USER_STATUS_ONLINE)
echo "<span style=\"color:green;font-weight:bold;\">Online</span><br>";
else if($operator->Status == USER_STATUS_BUSY)
echo "<span style=\"color:orange;font-weight:bold;\">Busy</span><br>";
else if($operator->Status == USER_STATUS_OFFLINE)
echo "<em>Offline</em><br>";
else
echo "<em>Away</em><br>";
echo "<a href=\"javascript:void(window.open('". LIVEZILLA_PATH . FILE_CHAT . "?intid=".$API->Base64UrlEncode($operator->UserId)."&mp=true','','width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes'))\">Start Chat</a>";
echo " | <a href=\"mailto:". $operator->Email ."\">Send Email</a>";
echo "<br><br></td>";
echo "</tr>";
}
?>
then how i can connect $var in ssItems.php with my php code ?
Thanks Again, and please Help
Bookmarks