* All Rights Reserved.
* 
 ********************************************************************************/
require_once 'include/utils/CommonUtils.php';
require_once 'include/Webservices/DescribeObject.php';
require_once 'include/Webservices/Query.php';
require_once 'modules/Tooltip/TooltipUtils.php';
global $current_user, $log;
$modname = $_REQUEST['modname'];
$id = $_REQUEST['id'];
$fieldname = $_REQUEST['fieldname'];
$tabid = getTabid($modname);
$result = ToolTipExists($fieldname, $tabid);
if ($result !== false) {
    //get tooltip information
    $viewid = 1;
    //viewid is 1 by default
    $descObject = vtws_describe($modname, $current_user);
    $id = vtws_getWebserviceEntityId($modname, $id);
    $sql = "select * from {$modname} where id ='{$id}';";
    $result = vtws_query($sql, $current_user);
    if (empty($result)) {
        exit(0);
    }
    $result = vttooltip_processResult($result, $descObject);
    $text = getToolTipText($viewid, $fieldname, $modname, $result);
    $tip = getToolTip($text);
    echo $tip;
} else {
    echo false;
}
Esempio n. 2
0
function getDownline($xMember_ID)
{
    $xMembers = mysql_fetch_assoc(mysql_query("SELECT * FROM tbl_users where parent_id='" . $xMember_ID . "'"));
    $final = "<table border='0' style='width:100%;' cellspacing='0' cellpadding='0'>";
    $final .= "<tr>";
    $nothing = true;
    $x = 0;
    $xPosition = '';
    $xLeft_Node = "<td align='center'><img src='images/inactive.png'></td>";
    $xRight_Node = "<td align='center'><img src='images/inactive.png'></td>";
    for ($i = 0; $i < count($xMembers); $i++) {
        $x++;
        $xPosition = $xMembers[$i]["Position"];
        if ($xPosition == "2") {
            $xLeft_Node = "<td align='center'>";
            if ($xMembers[$i]["Status"] == "0") {
                $xLeft_Node .= "<a href='binarytree.php?txtMember_ID=" . $xMembers[$i]["uid"] . "'><img src='images/disabled.png' title='" . getToolTip($xMembers[$i]["uid"]) . "' border='0'></a>";
            } else {
                $xLeft_Node .= "<a href='binarytree.php?txtMember_ID=" . $xMembers[$i]["uid"] . "'><img src='images/active.png' title='" . getToolTip($xMembers[$i]["uid"]) . "' border='0'></a>";
            }
            $xLeft_Node .= "<br />" . getInfo($xMembers[$i]["uid"]) . "</td>";
        }
        if ($xPosition == "1") {
            $xRight_Node = "<td align='center'>";
            if ($xMembers[$i]["Status"] == "0") {
                $xRight_Node .= "<a href='binarytree.php?txtMember_ID=" . $xMembers[$i]["uid"] . "'><img src='images/disabled.png' title='" . getToolTip($xMembers[$i]["uid"]) . "' border='0'></a>";
            } else {
                $xRight_Node .= "<a href='binarytree.php?txtMember_ID=" . $xMembers[$i]["uid"] . "'><img src='images/active.png' title='" . getToolTip($xMembers[$i]["uid"]) . "' border='0'></a>";
            }
            $xRight_Node .= "<br />" . getInfo($xMembers[$i]["uid"]) . "</td>";
        }
        $nothing = false;
    }
    $final .= $xLeft_Node . $xRight_Node;
    $final .= "</tr>";
    $final .= "</table>";
    return $final;
}