Ejemplo n.º 1
0
    $form->add(new Hidden("oid", $oid));
    $form->forbidDelete(true);
    $form->forbidUpdate(true);
    if (value("action") == "uninstall" && is_numeric($oid)) {
        uninstallPlugin($oid);
    }
}
if (value("action") == $lang->get("settings")) {
    if ($page_action == "") {
        $page_action = 'UPDATE';
        $page_state = "start";
    }
    //if (!isset($go)) $go="update";
    //$page_action="UPDATE";
    $oid = value("oid", "NUMERIC");
    $form = new StdEDForm($lang->get("settings"));
    $cond = $form->setPK("modules", "MODULE_ID");
    $form->forbidDelete(true);
    $form->addHeaderLink(crHeaderLink($lang->get("Back"), 'modules/plugins/install.php?oid=' . $oid . '&sid=' . $sid . '&go=update'));
    $form->add(new DisplayedValue($lang->get("name"), "modules", "MODULE_NAME", "MODULE_ID={$oid}"));
    $region[0][0] = 'Please Select';
    $region[0][1] = '0';
    $region[1][0] = 'Website Header';
    $region[1][1] = 'HEAD1';
    $region[2][0] = 'Website Footer';
    $region[2][1] = 'FOOT1';
    $region[3][0] = 'Content Header';
    $region[3][1] = 'HEAD2';
    $region[4][0] = 'Content Footer';
    $region[4][1] = 'FOOT2';
    $region[5][0] = 'Content Side';
Ejemplo n.º 2
0
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with N/X; if not, write to the Free Software
 *	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **********************************************************************/
require_once "../../config.inc.php";
$auth = new auth("NEWSLETTERADM");
$page = new page("Newsletter configuration");
include "logic/menudef.inc.php";
$filter = new Filter("mailinglist", "MAILINGLIST_ID");
$filter->addRule($lang->get("name"), "NAME", "NAME");
$filter->type_name = $lang->get("newsletter", "Newsletter");
$filtermenu = new Filtermenu($lang->get("newsletter"), $filter);
$deleteHandler = new ActionHandler("Delete");
$deleteHandler->addDBAction("Delete from mailinglist Where MAILINGLIST_ID = <oid>");
$form = new StdEDForm($lang->get("edit_newsletter", "Edit newsletter"));
$cond = $form->setPK("mailinglist", "MAILINGLIST_ID");
$form->add(new TextInput($lang->get("name"), "mailinglist", "NAME", $cond, "type:text,width:300,size:128", "MANDATORY&UNIQUE"));
$form->add(new TextInput($lang->get("description"), "mailinglist", "DESCRIPTION", $cond, "type:textarea,width:300,size:8"));
$form->add(new TextInput($lang->get("from_name", 'Sender Name'), "mailinglist", "FROM_NAME", $cond, "type:text,width:300,size:128", "MANDATORY"));
$form->add(new TextInput($lang->get("from_email", 'Sender EMail'), "mailinglist", "FROM_EMAIL", $cond, "type:text,width:300,size:128", "MANDATORY"));
$form->registerActionHandler($deleteHandler);
$page->addMenu($filtermenu);
$page->add($form);
$page->draw();
echo $errors;
?>
	 
	// process object actions.
	if ($action != "0") {

		
		if ($action == $lang->get("createcopy")) {
			$page_state="start";
			if (value("prcstate") == "data") {
				$name = value("copyname");
				if ($name=="0") $name = "Cluster";
				$name = makeCopyName("cluster_templates", "NAME", $name, "CATEGORY_ID = ".$pnode);
				$oid = copyClusterTemplate($oid, $name);
				$action = "editobject";			
			} else {
				$page_action = "INSERT";
				$form = new StdEDForm($lang->get("copyclt", "Copy cluster template"));
				$form->headerlink = crHeaderLink($lang->get('ed_clt'), "modules/clustertemplate/clustertemplates.php?sid=$sid&oid=".value("oid", "NUMERIC")."&action=editobject");
				$form->add(new Label("lbl", $lang->get("source", "Source"), "standardlight"));
				$form->add(new Label("lbl", getDBCell("cluster_templates", "NAME", "CLT_ID = $oid"), "standardlight"));
				$form->add(new Label("lbl", $lang->get("newname", "New Name"), "standardlight"));
				$form->add(new Input("copyname", "Cluster Template", "standard"));
				$form->add(new Hidden("action", $lang->get("createcopy")));
				$form->add(new Hidden("oid", $oid));
				$form->add(new Hidden("prcstate", "data"));
				$form->forbidDelete(true);				
				$page->add($form);
			}
		}
			
		/** Create a new object **/
		if ($action == "newobject" && $aclf->checkAccessToFunction("NEW_CL_TEMP")) {