Пример #1
0
function deleteUser($id)
{
    global $tables;
    Sql_Query(sprintf('delete from %s where userid = %d', $tables["listuser"], $id));
    Sql_Query(sprintf('delete from %s where userid = %d', $tables["user_attribute"], $id));
    Sql_Query(sprintf('delete from %s where userid = %d', $tables["usermessage"], $id));
    Sql_Query(sprintf('delete from %s where user = %d', $tables["user_message_bounce"], $id));
    Sql_Query(sprintf('delete from %s where id = %d', $tables["user"], $id));
    Sql_Query(sprintf('delete from %s where userid = %d', $tables["user_history"], $id));
    if (Sql_table_exists('user_group')) {
        Sql_Query(sprintf('delete from user_group where userid = %d', $id), 1);
    }
    ### allow plugins to delete their data
    if (is_array($GLOBALS['plugins'])) {
        foreach ($GLOBALS['plugins'] as $plugin) {
            //$plugin->deleteUser($id);
            if (method_exists($plugin, "deleteUser")) {
                $plugin->deleteUser($id);
            }
        }
    }
}
Пример #2
0
$some = 0;
$ls = new WebblerListing('');
if (checkAccess("configure")) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('configure');
    $ls->addElement($element, PageURL2("configure"));
    $ls->addColumn($element, " ", PageLinkClass('configure', $GLOBALS['I18N']->get('Configure') . ' ' . NAME, '', 'hometext'));
    $ls->setClass($element, "configure");
}
if (checkAccess("attributes") && !$_GET["pi"]) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('attributes');
    $ls->addElement($element, PageURL2("attributes"));
    $ls->addColumn($element, " ", PageLinkClass('attributes', $GLOBALS['I18N']->get('Configure Attributes'), '', 'hometext'));
    $ls->setClass($element, "configure-attributes");
    if (Sql_table_exists($tables["attribute"])) {
        $res = Sql_Query("select * from " . $tables["attribute"], 0);
        while ($row = Sql_Fetch_array($res)) {
            if ($row["type"] != "checkbox" && $row["type"] != "textarea" && $row["type"] != "textline" && $row["type"] != "hidden") {
                $ls->addElement($row["name"], PageURL2("editattributes&id=" . $row["id"]));
                $ls->addColumn($row["name"], " ", PageLinkClass('editattributes&id=' . $row["id"], $GLOBALS['I18N']->get('Control values for') . ' ' . $row["name"], '', 'hometext'));
                $ls->setClass($row["name"], "custom-attribute");
            }
        }
    }
}
if (checkAccess("spage")) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('spage');
    $ls->addElement($element, PageURL2("spage"));
    $ls->addColumn($element, " ", PageLinkClass('spage', $GLOBALS['I18N']->get('Configure Subscribe Pages'), '', 'hometext'));
Пример #3
0
            }
        }
        if (!isset($lan['gettext'])) {
            $lan['gettext'] = $lancode;
        }
        if (!isset($lan['dir'])) {
            $lan['dir'] = 'ltr';
        }
        if (!empty($lan['name']) && !empty($lan['charset'])) {
            $LANGUAGES[$lancode] = array($lan['name'], $lan['charset'], $lan['charset'], $lan['gettext'], $lan['dir']);
        }
        #    print '<br/>'.$landir.'/'.$lancode;
    }
}
## pick up other languages from DB
if (Sql_table_exists('i18n')) {
    $req = Sql_Query(sprintf('select lan,translation from %s where 
    original = "language-name" and lan not in ("%s")', $GLOBALS['tables']['i18n'], implode('","', array_keys($LANGUAGES))));
    while ($row = Sql_Fetch_Assoc($req)) {
        $LANGUAGES[$row['lan']] = array($row['translation'], 'UTF-8', 'UTF-8', $row['lan']);
    }
}
function lanSort($a, $b)
{
    return strcmp(strtolower($a[0]), strtolower($b[0]));
}
uasort($LANGUAGES, 'lanSort');
#var_dump($LANGUAGES);
if (!empty($GLOBALS['SessionTableName'])) {
    require_once dirname(__FILE__) . '/sessionlib.php';
}
Пример #4
0
$some = 0;
$ls = new WebblerListing('');
if (checkAccess('configure')) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('configure');
    $ls->addElement($element, PageURL2('configure'));
    $ls->addColumn($element, '&nbsp;', PageLinkClass('configure', $GLOBALS['I18N']->get('Configure') . ' ' . NAME, '', 'hometext'));
    $ls->setClass($element, 'configure');
}
if (checkAccess('attributes') && !$_GET['pi']) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('attributes');
    $ls->addElement($element, PageURL2('attributes'));
    $ls->addColumn($element, '&nbsp;', PageLinkClass('attributes', $GLOBALS['I18N']->get('Configure Attributes'), '', 'hometext'));
    $ls->setClass($element, 'configure-attributes');
    if (Sql_table_exists($tables['attribute'])) {
        $res = Sql_Query('select * from ' . $tables['attribute'], 0);
        while ($row = Sql_Fetch_array($res)) {
            if ($row['type'] != 'checkbox' && $row['type'] != 'textarea' && $row['type'] != 'textline' && $row['type'] != 'hidden') {
                $ls->addElement($row['name'], PageURL2('editattributes&amp;id=' . $row['id']));
                $ls->addColumn($row['name'], '&nbsp;', PageLinkClass('editattributes&amp;id=' . $row['id'], $GLOBALS['I18N']->get('Control values for') . ' ' . $row['name'], '', 'hometext'));
                $ls->setClass($row['name'], 'custom-attribute');
            }
        }
    }
}
if (checkAccess('spage')) {
    $some = 1;
    $element = $GLOBALS['I18N']->get('spage');
    $ls->addElement($element, PageURL2('spage'));
    $ls->addColumn($element, '&nbsp;', PageLinkClass('spage', $GLOBALS['I18N']->get('Configure Subscribe Pages'), '', 'hometext'));