/**
  * Button für die Eingabe
  */
 function matchLinkButton(&$sql, $content)
 {
     global $REX;
     $def_category = '';
     $article_id = rex_request('article_id', 'int');
     if ($article_id != 0) {
         $art = OOArticle::getArticleById($article_id);
         $def_category = $art->getCategoryId();
     }
     $var = 'REX_LINK_BUTTON';
     $matches = $this->getVarParams($content, $var);
     foreach ($matches as $match) {
         list($param_str, $args) = $match;
         list($id, $args) = $this->extractArg('id', $args, 0);
         if ($id < 11 && $id > 0) {
             // Wenn vom Programmierer keine Kategorie vorgegeben wurde,
             // die Linkmap mit der aktuellen Kategorie öffnen
             list($category, $args) = $this->extractArg('category', $args, $def_category);
             $replace = $this->getLinkButton($id, $this->getValue($sql, 'link' . $id), $category, $args);
             $replace = $this->handleGlobalWidgetParams($var, $args, $replace);
             $content = str_replace($var . '[' . $param_str . ']', $replace, $content);
         }
     }
     return $content;
 }
function rex_a256_search_mpool_query($params)
{
    global $REX;
    if (!$REX['USER']->hasPerm('be_search[mediapool]')) {
        return $params['subject'];
    }
    $media_name = rex_request('a256_media_name', 'string');
    if ($media_name == '') {
        return $params['subject'];
    }
    $qry = $params['subject'];
    $category_id = $params['category_id'];
    $qry = str_replace('f.category_id=' . $category_id, '1=1', $qry);
    $where = " (f.filename LIKE '%" . $media_name . "%' OR f.title LIKE '%" . $media_name . "%')";
    $searchmode = OOAddon::getProperty('be_search', 'searchmode', 'local');
    // global search - all
    if ($searchmode == 'global') {
        $qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
        return $qry;
        // local search - all categories and with no category
    } elseif ($category_id == 0) {
        $qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
        // local search - categorie and subcategories
    } else {
        $where .= ' AND f.category_id = c.id  ';
        $where .= " AND (c.path LIKE '%|" . $params['category_id'] . "|%' OR c.id=" . $params['category_id'] . ') ';
        $qry = str_replace('FROM ', 'FROM ' . $REX['TABLE_PREFIX'] . 'file_category c,', $qry);
        $qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
    }
    return $qry;
}
    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        global $REX;
        if ($REX['ADDON']['community']['plugin_auth']['stay_active'] != 1) {
            return;
        }
        $l_label = 'eingeloggt bleiben';
        if (isset($this->elements[2])) {
            $l_label = $this->elements[2];
        }
        $checked = '';
        if (isset($this->elements[3]) && $this->elements[3] == 1) {
            $checked = ' checked="checked"';
        }
        $sa = rex_request('rex_com_auth_stay_active', "int");
        if ($sa == 1) {
            $checked = ' checked="checked"';
        }
        $form_output[] .= '
		<p class="formcheckbox form-com-auth-stayactive formlabel-' . $this->getName() . '" id="' . $this->getHTMLId() . '">
			<input type="checkbox" class="checkbox " name="rex_com_auth_stay_active" id="el_' . $this->getId() . '" value="1" ' . $checked . ' />
			<label class="checkbox " for="el_' . $this->getId() . '" >' . $l_label . '</label>
		</p>
		';
    }
 function enterObject()
 {
     global $REX;
     require_once realpath(dirname(__FILE__) . '/../../ext/captcha/class.captcha_x.php');
     $captcha = new captcha_x();
     $captchaRequest = rex_request('captcha', 'string');
     if ($captchaRequest == 'show') {
         while (@ob_end_clean()) {
         }
         $captcha->handle_request();
         exit;
     }
     if ($this->params['send'] == 1 & $captcha->validate($this->getValue())) {
         if (isset($_SESSION['captcha'])) {
             unset($_SESSION['captcha']);
         }
     } elseif ($this->params['send'] == 1) {
         // Error. Fehlermeldung ausgeben
         $this->params['warning'][$this->getId()] = $this->params['error_class'];
         $this->params['warning_messages'][$this->getId()] = $this->getElement(2);
     }
     if ($this->getElement(3) != '') {
         $link = $this->getElement(3) . '?captcha=show&' . time() . microtime();
     } else {
         $link = rex_getUrl($this->params['article_id'], $this->params['clang'], array('captcha' => 'show'), '&') . '&' . time() . microtime();
     }
     $this->params['form_output'][$this->getId()] = $this->parse('value.captcha.tpl.php', array('link' => $link));
 }
 public function execute()
 {
     global $I18N;
     $addonkey = rex_request('addonkey', 'string');
     $upload = rex_request('upload', array(array('upload_file', 'bool'), array('oldversion', 'string'), array('redaxo', 'array[string]'), array('description', 'string'), array('status', 'int'), array('replace_assets', 'bool'), array('ignore_tests', 'bool')));
     $file = array();
     $archive = null;
     $file['version'] = $upload['upload_file'] ? OOAddon::getVersion($addonkey) : $upload['oldversion'];
     $file['redaxo_versions'] = $upload['redaxo'];
     $file['description'] = stripslashes($upload['description']);
     $file['status'] = $upload['status'];
     if ($upload['upload_file']) {
         $archive = rex_path::addonCache('install', md5($addonkey . time()) . '.zip');
         $exclude = array();
         if ($upload['replace_assets']) {
             $exclude[] = 'files';
         }
         if ($upload['ignore_tests']) {
             $exclude[] = 'tests';
         }
         rex_install_archive::copyDirToArchive(rex_path::addon($addonkey), $archive, null, $exclude);
         if ($upload['replace_assets']) {
             rex_install_archive::copyDirToArchive(rex_path::addonAssets($addonkey), $archive, $addonkey . '/files');
         }
         $file['checksum'] = md5_file($archive);
     }
     rex_install_webservice::post(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)), array('file' => $file), $archive);
     if ($archive) {
         rex_file::delete($archive);
     }
     unset($_REQUEST['addonkey']);
     unset($_REQUEST['file']);
     rex_install_packages::deleteCache();
     return $I18N->msg('install_info_addon_uploaded', $addonkey);
 }
function rex_a256_search_mpool_query($params)
{
    global $REX;
    if (!$REX['USER']->hasPerm('be_search[mediapool]')) {
        return $params['subject'];
    }
    $media_name = rex_request('a256_media_name', 'string');
    if ($media_name == '') {
        return $params['subject'];
    }
    $qry = $params['subject'];
    $category_id = $params['category_id'];
    $where = " f.category_id = c.id AND (f.filename LIKE '%" . $media_name . "%' OR f.title LIKE '%" . $media_name . "%')";
    switch (OOAddon::getProperty('be_search', 'searchmode', 'local')) {
        case 'local':
            // Suche auf aktuellen Kontext eingrenzen
            if ($category_id != 0) {
                $where .= " AND (c.path LIKE '%|" . $params['category_id'] . "|%' OR c.id=" . $params['category_id'] . ") ";
            } else {
                $qry = str_replace('f.category_id=0', '1=1', $qry);
            }
    }
    $qry = str_replace('FROM ', 'FROM ' . $REX['TABLE_PREFIX'] . 'file_category c,', $qry);
    $qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
    return $qry;
}
    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        global $REX;
        $this->label = $this->elements[1];
        $this->request_field = $this->elements[3];
        $field = rex_request($this->request_field, "int", "0");
        $this->user_name = "ddd";
        if ($field != "0" && rex_com_user::createObject($field)) {
            $this->value = $REX["COM_CACHE"]["USER"][$field]->getValue("email");
            $this->user_name = rex_com_showUser(&$REX["COM_CACHE"]["USER"][$field], "name", "", FALSE);
        } else {
            $warning = $this->elements[5];
            return;
        }
        $form_output[] = '
			<p class="formtext">
				<input type="hidden" name="' . $this->request_field . '" value="' . htmlspecialchars($field) . '" />
				<label class="text" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>
				<input type="text" class="text inp_disabled" disabled="disabled"  id="el_' . $this->id . '" value="' . htmlspecialchars($this->user_name) . '" />
			</p>';
        $email_elements[$this->elements[1]] = stripslashes($this->value);
        if (!isset($this->elements[4]) || $this->elements[4] != "no_db") {
            $sql_elements[$this->elements[1]] = $this->value;
        }
        return;
    }
 function prepareQuery($query)
 {
     global $_orderby;
     $rowsPerPage = $this->getRowsPerPage();
     $startRow = $this->getStartRow();
     if (rex_request('sort') && $_orderby != "") {
         $sortColumn = $_orderby;
     } else {
         $sortColumn = $this->getSortColumn();
     }
     if ($sortColumn != '') {
         $sortType = $this->getSortType();
         if (strpos(strtoupper($query), 'ORDER BY') === false) {
             $query .= ' ORDER BY ' . $sortColumn . ' ' . $sortType;
         } else {
             if (rex_request('sorttype') == 'desc') {
                 $query = $query . $sortType;
             } else {
                 $query = preg_replace('/ORDER BY [^ ]*(asc|desc)?/i', 'ORDER BY ' . $sortColumn . ' ' . $sortType, $query);
             }
         }
     }
     $query .= ' LIMIT ' . $startRow . ',' . $rowsPerPage;
     return $query;
 }
    public static function printLangSelect($params)
    {
        global $REX, $I18N;
        $out = '';
        $clang = rex_request('clang', 'int');
        $out .= '
			 <div id="rex-clang" class="rex-toolbar">
			 <div class="rex-toolbar-content">
				 <ul>
					 <li>' . $I18N->msg("languages") . ' : </li>';
        $i = 0;
        $stop = false;
        foreach ($REX['CLANG'] as $key => $val) {
            $i++;
            if ($i == 1) {
                $out .= '<li class="rex-navi-first rex-navi-clang-' . $key . '">';
            } else {
                $out .= '<li class="rex-navi-clang-' . $key . '">';
            }
            $val = rex_translate($val);
            $class = '';
            if ($key == $clang) {
                $class = ' class="rex-active"';
            }
            $curQuery = rex_post('current_query', 'string', '');
            if ($curQuery != '') {
                $urlQuery = $curQuery;
                parse_str($curQuery, $vals);
                $vals['clang'] = $key;
                $urlQuery = http_build_query($vals);
            } else {
                $urlQuery = self::getURLQuery($key);
            }
            if (!$REX['USER']->isAdmin() && !$REX['USER']->hasPerm('clang[all]') && !$REX['USER']->hasPerm('clang[' . $key . ']')) {
                $out .= '<span class="rex-strike">' . $val . '</span>';
                if ($clang == $key) {
                    $stop = true;
                }
            } else {
                $out .= '<a' . $class . ' href="index.php?' . $urlQuery . '">' . $val . '</a>';
                $out .= '</li>';
            }
        }
        $out .= '
				 </ul>
			 </div>
			 </div>
		';
        echo $out;
        if ($stop) {
            echo '
			<!-- *** OUTPUT OF CLANG-VALIDATE - START *** -->
			' . rex_warning($I18N->msg('string_table_no_lang_perm')) . '
			<!-- *** OUTPUT OF CLANG-VALIDATE - END *** -->
			';
            require $REX['INCLUDE_PATH'] . "/layout/bottom.php";
            exit;
        }
    }
 public function setValue($value)
 {
     if ($this->getElement(3) == 'REQUEST' && isset($_REQUEST[$this->getName()])) {
         $this->value = stripslashes(rex_request($this->getName()));
     } else {
         $this->value = $this->getElement(2);
     }
 }
Example #11
0
 function asd_filterPosts(array $names)
 {
     $return = array();
     foreach ($names as $key => $cast) {
         $return[$key] = rex_request($key, $cast);
     }
     return $return;
 }
function rex_a128_historyHandler($params)
{
    global $page, $subpage, $REX_USER, $REX;
    $mypage = $params['mypage'];
    require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_historyManager.inc.php';
    require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_history.inc.php';
    require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_historyItem.inc.php';
    $function = rex_request('function', 'string');
    $mode = rex_request('mode', 'string');
    // Alle Histories registrierens
    $articleHistory =& rexHistoryManager::getHistory('articles');
    $templateHistory =& rexHistoryManager::getHistory('templates');
    $moduleHistory =& rexHistoryManager::getHistory('modules');
    $actionHistory =& rexHistoryManager::getHistory('actions');
    $sql = new rex_sql();
    $sql->debugsql = true;
    if ($page == 'module' && $function == 'edit' && ($module_id = rex_get('modul_id', 'int')) != 0) {
        $result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'modultyp WHERE id=' . $module_id);
        if (isset($result[0])) {
            $link = 'index.php?page=' . $page . '&function=' . $function . '&modul_id=' . $module_id;
            $title = $result[0]['name'];
            if ($REX_USER->hasPerm('advancedMode[]')) {
                $title .= ' [' . $module_id . ']';
            }
            $moduleHistory->addItem(new rexHistoryItem($title, $link));
        }
    } elseif ($page == 'module' && $subpage == 'actions' && $function == 'edit' && ($action_id = rex_get('action_id', 'int')) != 0) {
        $result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'action WHERE id=' . $action_id);
        if (isset($result[0])) {
            $link = 'index.php?page=' . $page . '&subpage=' . $subpage . '&function=' . $function . '&modul_id=' . $action_id;
            $title = $result[0]['name'];
            if ($REX_USER->hasPerm('advancedMode[]')) {
                $title .= ' [' . $action_id . ']';
            }
            $actionHistory->addItem(new rexHistoryItem($title, $link));
        }
    } elseif ($page == 'template' && $function == 'edit' && ($template_id = rex_get('template_id', 'int')) != 0) {
        $result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'template WHERE id=' . $template_id);
        if (isset($result[0])) {
            $link = 'index.php?page=' . $page . '&function=' . $function . '&template_id=' . $template_id;
            $title = $result[0]['name'];
            if ($REX_USER->hasPerm('advancedMode[]')) {
                $title .= ' [' . $template_id . ']';
            }
            $templateHistory->addItem(new rexHistoryItem($title, $link));
        }
    } elseif ($page == 'content' && $mode == 'edit' && ($article_id = rex_get('article_id', 'int')) != 0) {
        $art = OOArticle::getArticleById($article_id);
        if (OOArticle::isValid($art)) {
            $link = 'index.php?page=' . $page . '&mode=' . $mode . '&article_id=' . $article_id;
            $title = $art->getName();
            if ($REX_USER->hasPerm('advancedMode[]')) {
                $title .= ' [' . $article_id . ']';
            }
            $articleHistory->addItem(new rexHistoryItem($title, $link));
        }
    }
}
 function execute()
 {
     $rex_com_auth_jump = rex_request('rex_com_auth_jump', 'string');
     if ($rex_com_auth_jump != "") {
         ob_end_clean();
         header('Location: http://' . $REX["SERVER"] . '/' . rex_com_auth_urldecode($rex_com_auth_jump));
         exit;
     }
 }
 public function execute()
 {
     global $I18N;
     $addonkey = rex_request('addonkey', 'string');
     rex_install_webservice::delete(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)));
     unset($_REQUEST['addonkey']);
     unset($_REQUEST['file']);
     rex_install_packages::deleteCache();
     return $I18N->msg('install_info_addon_deleted', $addonkey);
 }
 function getACRequestValues($REX_ACTION)
 {
     $values = rex_request('VALUE', 'array');
     for ($i = 1; $i < 21; $i++) {
         $value = isset($values[$i]) ? stripslashes($values[$i]) : '';
         $REX_ACTION['VALUE'][$i] = $value;
     }
     $REX_ACTION['PHP'] = stripslashes(rex_request('INPUT_PHP', 'string'));
     $REX_ACTION['HTML'] = $this->stripPHP(stripslashes(rex_request('INPUT_HTML', 'string')));
     return $REX_ACTION;
 }
 function getACRequestValues($REX_ACTION)
 {
     $values = rex_request('MEDIA', 'array');
     $listvalues = rex_request('MEDIALIST', 'array');
     for ($i = 1; $i < 11; $i++) {
         $media = isset($values[$i]) ? stripslashes($values[$i]) : '';
         $medialist = isset($listvalues[$i]) ? stripslashes($listvalues[$i]) : '';
         $REX_ACTION['MEDIA'][$i] = $media;
         $REX_ACTION['MEDIALIST'][$i] = $medialist;
     }
     return $REX_ACTION;
 }
 function getACRequestValues($REX_ACTION)
 {
     // SLICE ID nur im Update Mode setzen
     if ($this->isEditEvent()) {
         $REX_ACTION['SLICE_ID'] = rex_request('slice_id', 'int');
     } else {
         $REX_ACTION['SLICE_ID'] = 0;
     }
     $REX_ACTION['CTYPE_ID'] = rex_request('ctype', 'int');
     $REX_ACTION['MODULE_ID'] = rex_request('module_id', 'int');
     return $REX_ACTION;
 }
Example #18
0
 public static function showForm()
 {
     $article_id = rex_request('article_id', 'int');
     $clang = rex_get('clang');
     $ctype = rex_get('ctype');
     $_SESSION[__CLASS__]['active'] = 1;
     // Alle OBs schließen
     while (@ob_end_clean()) {
     }
     header("Location: " . rex_url::backendController() . '?article_id=' . $article_id . '&clang=' . $clang . '&page=content/edit&ctype=' . $ctype);
     exit;
 }
Example #19
0
 function getSearchVars()
 {
     $rex_yform_searchvars = rex_request('rex_yform_searchvars', 'array');
     unset($rex_yform_searchvars['send']);
     unset($rex_yform_searchvars['yform_search_submit']);
     foreach ($rex_yform_searchvars as $k => $v) {
         if ($v == '') {
             unset($rex_yform_searchvars[$k]);
         }
     }
     return array('rex_yform_searchvars' => $rex_yform_searchvars);
 }
Example #20
0
function a587_stats_addtruncate($params)
{
    global $I18N;
    if (rex_request('func') == 'truncate') {
        $stats = new rexsearchStats();
        $stats->truncate();
        a587_stats_saveSettings(array('maxtopSearchitems' => '10', 'searchtermselect' => '', 'searchtermselectmonthcount' => '12'));
        $params['subject'] = rex_info($I18N->Msg('a587_stats_truncate_done')) . $params['subject'];
    }
    $params['subject'] .= '<p class="rex-tx1">' . $I18N->Msg('a587_stats_truncate') . '</p>
<p class="rex-button"><a onclick="return confirm(\'' . $I18N->Msg('a587_stats_truncate_confirm') . '\');" href="index.php?page=rexsearch&amp;subpage=generate&amp;func=truncate" class="rex-button"><span>' . $I18N->Msg('a587_stats_truncate_button') . '</span></a></p>';
    return $params['subject'];
}
Example #21
0
function delete($id, $table)
{
    $sql = rex_sql::getInstance();
    if (DEBUG) {
        $sql->debugsql = true;
    }
    $sql->setTable(rex_request('table'));
    $sql->setWhere('id = ' . $id);
    if ($sql->delete()) {
        return true;
    }
    return false;
}
 function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
 {
     if (isset($this->elements[3]) && $this->elements[3] == "REQUEST" && isset($_REQUEST[$this->getName()])) {
         $this->setValue(stripslashes(rex_request($this->getName())));
         $form_output[$this->getId()] = "\n" . '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getHTMLId() . '" value="' . htmlspecialchars($this->getValue()) . '" />';
     } else {
         $this->setValue($this->elements[2]);
         $email_elements[$this->getName()] = $this->getValue();
     }
     $email_elements[$this->getName()] = stripslashes($this->getValue());
     if (!isset($this->elements[4]) || $this->elements[4] != "no_db") {
         $sql_elements[$this->getName()] = $this->getValue();
     }
 }
Example #23
0
 public function getFBImage()
 {
     if (rex_request('newsid', 'int') > 0) {
         $r = parent::returnName('thumb');
         // Facebook-Image in Detailansicht, Listenübersichtsbild
         if ($r != "") {
             if (file_exists('files/' . $r)) {
                 include "redaxo/include/addons/" . MY_PAGE . "/conf/conf.php";
                 $fb_image = 'index.php?rex_img_type=' . $REX_NEWS_CONF['image_list_type'] . '&rex_img_file=' . $r;
                 return $fb_image;
             }
         }
     }
 }
 function getACRequestValues($REX_ACTION)
 {
     $values = rex_request('VALUE', 'array');
     for ($i = 1; $i < 21; $i++) {
         // Nur Werte die urspruenglich gepostet wurden auch uebernehmen
         // siehe http://forum.redaxo.de/ftopic8174.html
         if (isset($values[$i])) {
             $REX_ACTION['VALUE'][$i] = stripslashes($values[$i]);
         }
     }
     $REX_ACTION['PHP'] = stripslashes(rex_request('INPUT_PHP', 'string'));
     $REX_ACTION['HTML'] = $this->stripPHP(stripslashes(rex_request('INPUT_HTML', 'string')));
     return $REX_ACTION;
 }
Example #25
0
 public function setRequestValues()
 {
     $request = ['value' => 20, 'media' => 10, 'medialist' => 10, 'link' => 10, 'linklist' => 10];
     foreach ($request as $key => $max) {
         $values = rex_request('REX_INPUT_' . strtoupper($key), 'array');
         for ($i = 1; $i <= $max; ++$i) {
             if (isset($values[$i])) {
                 if (is_array($values[$i])) {
                     $values[$i] = json_encode($values[$i]);
                 }
                 $this->sql->setValue($key . $i, $values[$i]);
             }
         }
     }
 }
 function getEventData($REX_ACTION)
 {
     // SLICE ID im Update Mode setzen
     if ($this->isEditEvent()) {
         $REX_ACTION['EVENT'] = 'EDIT';
         $REX_ACTION['SLICE_ID'] = rex_request('slice_id', 'int');
     } elseif ($this->isDeleteEvent()) {
         $REX_ACTION['EVENT'] = 'DELETE';
         $REX_ACTION['SLICE_ID'] = rex_request('slice_id', 'int');
     } else {
         $REX_ACTION['EVENT'] = 'ADD';
         $REX_ACTION['SLICE_ID'] = 0;
     }
     return $REX_ACTION;
 }
 public static function handleAjaxCall($page, $func, $table, $idField, $useLike)
 {
     global $REX;
     if (isset($REX['USER']) && rex_request('page') == $page) {
         self::$ajaxFunctionName = $func;
         if (rex_request('func') == self::$ajaxFunctionName) {
             // update prio in db
             self::updatePrio(rex_request('order'), $table, $idField, $useLike);
             // update init file to reflect changes
             rex_website_manager::updateInitFile();
             // stop executing rest of redaxo stuff
             exit;
         }
     }
 }
 function getACRequestValues($REX_ACTION)
 {
     $values = rex_request('MEDIA', 'array');
     $listvalues = rex_request('MEDIALIST', 'array');
     for ($i = 1; $i < 11; $i++) {
         // Nur Werte die urspruenglich gepostet wurden auch uebernehmen
         // siehe http://forum.redaxo.de/ftopic8174.html
         if (isset($values[$i])) {
             $REX_ACTION['MEDIA'][$i] = stripslashes($values[$i]);
         }
         if (isset($listvalues[$i])) {
             $REX_ACTION['MEDIALIST'][$i] = stripslashes($listvalues[$i]);
         }
     }
     return $REX_ACTION;
 }
Example #29
0
 public function execute()
 {
     if (!rex::getUser()->isAdmin()) {
         throw new rex_api_exception('You do not have the permission!');
     }
     $addonkey = rex_request('addonkey', 'string');
     try {
         rex_install_webservice::delete(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)));
     } catch (rex_functional_exception $e) {
         throw new rex_api_exception($e->getMessage());
     }
     unset($_REQUEST['addonkey']);
     unset($_REQUEST['file']);
     rex_install_packages::deleteCache();
     return new rex_api_result(true, rex_i18n::msg('install_info_addon_deleted', $addonkey));
 }
    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        global $REX;
        $l_label = 'Benutzername';
        if (isset($this->elements[2])) {
            $l_label = $this->elements[2];
        }
        $login = rex_request('rex_com_auth_name', 'string');
        $form_output[] .= '
		<p class="formtext form-com-auth-login formlabel-' . $this->getName() . '" id="' . $this->getHTMLId() . '">
			<label class="text" for="el_' . $this->getId() . '" >' . $l_label . '</label>
			<input type="text" class="text" name="rex_com_auth_name" id="el_' . $this->getId() . '" value="' . htmlspecialchars(stripslashes($login)) . '" />
		</p>
		';
        return;
    }