$template->assign("captions", $captions);
        $template->assign("is_email", 1);
        $emailHtml = $template->render();
        if (count($emaillist)) {
            //This is an easy way to remove duplicates
            $emaillist = array_flip(array_flip($emaillist));
            if (!defined("SYS_SMTP")) {
                require_once BASE . "subsystems/smtp.php";
            }
            $headers = array("MIME-Version" => "1.0", "Content-type" => "text/html; charset=iso-8859-1");
            if (pathos_smtp_mail($emaillist, "", $f->subject, $emailHtml, $headers) == false) {
                pathos_lang_loadDictionary('modules', 'formbuilder');
                echo TR_FORMBUILDER_ERR_SMTP;
            }
        }
    }
    //If is a new post show response, otherwise redirect to the flow.
    if (!isset($_POST['data_id'])) {
        $template = new template("formbuilder", "_view_response");
        global $SYS_FLOW_REDIRECTIONPATH;
        $SYS_FLOW_REDIRECTIONPATH = "editfallback";
        $template->assign("backlink", pathos_flow_get());
        $SYS_FLOW_REDIRECTIONPATH = "pathos_default";
        $template->assign("response_html", $f->response);
        $template->output();
    } else {
        pathos_flow_redirect();
    }
} else {
    echo SITE_403_HTML;
}
    $template = new template('administrationmodule', '_upload_finalSummary', $loc);
    $sessid = session_id();
    if (!file_exists(BASE . "extensionuploads/{$sessid}") || !is_dir(BASE . "extensionuploads/{$sessid}")) {
        $template->assign('nofiles', 1);
    } else {
        if (!defined('SYS_FILES')) {
            require_once BASE . 'subsystems/files.php';
        }
        $success = array();
        foreach (array_keys(pathos_files_listFlat(BASE . "extensionuploads/{$sessid}", true, null, array(), BASE . "extensionuploads/{$sessid}")) as $file) {
            if ($file != '/archive.tar' && $file != '/archive.tar.gz' && $file != 'archive.tar.bz2' && $file != '/archive.zip') {
                pathos_files_makeDirectory(dirname($file));
                $success[$file] = copy(BASE . "extensionuploads/{$sessid}" . $file, BASE . substr($file, 1));
                if (basename($file) == 'views_c') {
                    chmod(BASE . substr($file, 1), 0777);
                }
            }
        }
        $del_return = pathos_files_removeDirectory(BASE . "extensionuploads/{$sessid}");
        echo $del_return;
        $template->assign('nofiles', 0);
        $template->assign('success', $success);
        $template->assign('redirect', pathos_flow_get());
        ob_start();
        include BASE . 'modules/administrationmodule/actions/installtables.php';
        ob_end_clean();
    }
    $template->output();
} else {
    echo SITE_403_HTML;
}
Exemple #3
0
 function standalonetemplate($view)
 {
     $this->tpl = new Smarty();
     //$this->tpl->security = true;
     $this->tpl->php_handling = SMARTY_PHP_REMOVE;
     $this->tpl->plugins_dir[] = BASE . "plugins";
     $file = pathos_template_getViewFile($view);
     $this->view = substr(basename($file), 0, -4);
     $this->viewdir = realpath(dirname($file) . "/..") . "/views";
     $this->tpl->template_dir = $this->viewdir;
     // Make way for i18n
     // $this->tpl->compile_dir = $this->viewdir."_c";
     $this->tpl->compile_dir = BASE . '/views_c';
     $this->tpl->compile_id = md5($this->viewfile);
     $this->tpl->assign("__view", $view);
     $this->tpl->assign("__redirect", pathos_flow_get());
 }
            $message .= "----------------------------------\n";
            $message .= "Name:  " . $_POST['name'] . "\n";
            $message .= "Email: " . $_POST['email'] . "\n";
            $message .= "----------------------------------\n";
            $message .= "Reasons for Volunteering:\n";
            $message .= wordwrap($_POST['reasons']) . "\n";
            $message .= "----------------------------------\n";
            $message .= "How they feel they can help:\n";
            $message .= wordwrap($_POST['howhelp']) . "\n";
            $message .= "----------------------------------\n";
            $message .= "Past experience and qualifications:\n";
            $message .= wordwrap($_POST['experience']) . "\n";
            $subject = "Software Roadmap : Volunteer for " . $milestone->name . ":" . $stepstone->name;
        } else {
            echo SITE_404_HTML;
            return;
            // exit this page
        }
    }
    if (!defined("SYS_SMTP")) {
        require_once BASE . "subsystems/smtp.php";
    }
    if (pathos_smtp_mail($stepstone->contact, $from, $subject, $message, $headers)) {
        echo "Message successfully sent.";
    } else {
        echo "There was a problem sending the message.  Please contact the system administrator.";
    }
    echo "<br /><br /><a href='" . pathos_flow_get() . "' class='mngmntlink codemap_mngmntlink'>Back</a>";
} else {
    echo SITE_404_HTML;
}
Exemple #5
0
 function controlToHTML($name)
 {
     if ($this->submit . $this->reset . $this->cancel == "") {
         return "";
     }
     $html = "";
     if ($this->submit != "") {
         $html .= '<input type="submit" value="' . $this->submit . '"';
         if ($this->disabled) {
             $html .= " disabled";
         }
         $html .= ' onClick="if (checkRequired(this.form)) ';
         if ($this->validateJS != "") {
             $html .= '{ if (' . $this->validateJS . ') { return true; } else { return false; } }';
         } else {
             $html .= '{ return true; }';
         }
         $html .= ' else { return false; }"';
         $html .= ' />';
     }
     if ($this->reset != "") {
         $html .= '<input type="reset" value="' . $this->reset . '"' . ($this->disabled ? " disabled" : "") . ' />';
     }
     if ($this->cancel != "") {
         $html .= '<input type="button" value="' . $this->cancel . '"';
         $html .= ' onClick="document.location.href=\'' . pathos_flow_get() . '\'"';
         $html .= ' />';
     }
     return $html;
 }
Exemple #6
0
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Exponent is distributed in the hope that it
# will be useful, 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 Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: Show\040Back\040Link.php,v 1.3 2005/02/19 00:35:56 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
echo '<a class="mngmntlink workflow_mngmntlink" href="';
echo pathos_flow_get();
echo '">Back</a> to approval manager.';
Exemple #7
0
# You should have received a copy of the GNU
# General Public License along with Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: revisions_viewrevision.php,v 1.2 2005/02/19 00:32:37 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
$object = $db->selectObject($_GET['datatype'] . "_wf_revision", "id=" . $_GET['id']);
$rloc = unserialize($object->location_data);
if (pathos_permissions_check("manage_approval", $rloc)) {
    // We need the module, in order to render the view correctly.
    $oloc = unserialize($object->location_data);
    $module = $oloc->mod;
    $template = new template($module, "_workflowview", $loc);
    $template->assign("item", $object);
    $view = $template->render();
    $t = new template("workflow", "_viewrevision", $loc);
    $t->assign("view", $view);
    $t->assign("back", pathos_flow_get());
    $t->assign("revision", $object);
    $t->output();
} else {
    echo SITE_403_HTML;
}
        $mod->description = $module->description();
        if (isset($container->view) && $container->internal->mod == $moduleclass) {
            $mod->defaultView = $container->view;
        } else {
            $mod->defaultView = DEFAULT_VIEW;
        }
        // Get support flags
        $mod->supportsSources = $module->hasSources() ? 1 : 0;
        $mod->supportsViews = $module->hasViews() ? 1 : 0;
        // Get a list of views
        $mod->views = pathos_template_listModuleViews($moduleclass);
        natsort($mod->views);
        if (!$haveclass) {
            $js_init .= pathos_javascript_class($mod, 'Module');
            $js_init .= "var modules = new Array();\r\n";
            $js_init .= "var modnames = new Array();\r\n\r\n";
            $haveclass = true;
        }
        $js_init .= "modules.push(" . pathos_javascript_object($mod, "Module") . ");\r\n";
        $js_init .= "modnames.push('" . $moduleclass . "');\r\n";
        $mods[$moduleclass] = $module->name();
    }
    $js_init .= "\r\n</script>";
    $template->assign('js_init', $js_init);
    $template->assign('modules', $mods);
    $template->assign('loc', $loc);
    $template->assign('back', pathos_flow_get());
    $template->output();
} else {
    echo SITE_403_HTML;
}