Пример #1
0
 /**
  * delete a Client from the database
  *
  * @param object $client reference to the Client to delete
  * @param bool $force
  * @return bool FALSE if failed.
  */
 function delete(&$client, $force = false)
 {
     $clientModule =& smartclient_getModuleInfo();
     $module_id = $clientModule->getVar('mid');
     if (get_class($client) != $this->classname) {
         return false;
     }
     $sql = sprintf("DELETE FROM %s WHERE id = %u", $this->_db->prefix($this->_dbtable), $client->getVar('id'));
     if (false != $force) {
         $result = $this->_db->queryF($sql);
     } else {
         $result = $this->_db->query($sql);
     }
     if (!$result) {
         return false;
     }
     return true;
 }
Пример #2
0
function smartclient_modFooter()
{
    global $xoopsUser, $xoopsDB, $xoopsConfig;
    $hModule =& xoops_gethandler('module');
    $smartModule = smartclient_getModuleInfo();
    $module_id = $smartModule->getVar('mid');
    $module_name = $smartModule->getVar('dirname');
    $smartConfig = smartclient_getModuleConfig();
    $module_id = $smartModule->getVar('mid');
    $versioninfo =& $hModule->get($smartModule->getVar('mid'));
    $modfootertxt = "Module " . $versioninfo->getInfo('name') . " - Version " . $versioninfo->getInfo('version') . "";
    $modfooter = "<a href='" . $versioninfo->getInfo('support_site_url') . "' target='_blank'><img src='" . SMARTCLIENT_URL . "images/spcssbutton.gif' title='" . $modfootertxt . "' alt='" . $modfootertxt . "'/></a>";
    return $modfooter;
}