예제 #1
0
         $prj_formid = COM_applyFilter($_GET['formid'], true);
     }
     $processid = DB_getItem($_TABLES['nf_queue'], 'nf_processID', "id='{$taskid}'");
     $parms = array('usermodeuid' => $usermodeUID, 'project_id' => $prj_id, 'project_formid' => $prj_formid, 'taskid' => $taskid, 'processid' => $processid);
     if ($_GET['singleuse'] == 1 or $nomenu == 1) {
         $parms['singleuse'] = 1;
     } else {
         echo taskconsoleShowNavbar('My Tasks');
     }
     echo nexform_showform($formid, $result, 'edit', $parms);
     break;
 case 'view':
     if ($_GET['singleuse'] != 1 and $nomenu != 1) {
         echo taskconsoleShowNavbar('My Tasks');
     }
     echo nexform_showform($formid, $result, 'review', '', $linkedformsOption);
     break;
 case 'myprojects':
     echo taskconsoleShowNavbar('My Flows');
     if ($layout == '' && $cookieLayout != '') {
         $layout = $cookieLayout;
     }
     if ($layout == 'status') {
         echo display_wfFlowsStatus($usermodeUID, false);
     } else {
         echo display_wfFlowsTabular($usermodeUID, false);
     }
     break;
 case 'allprojects':
     echo taskconsoleShowNavbar('All Flows');
     if ($layout == '' && $cookieLayout != '') {
예제 #2
0
        nexform_dbupdate($form_id, $result_id);
    } else {
        nexform_dbsave($form_id);
    }
    /* Send results via email */
    nexform_emailresults();
    /* Update the hit or results counter */
    DB_query("UPDATE {$_TABLES['nxform_definitions']} SET responses = responses + 1 WHERE id='{$form_id}'");
    $completion_msg = DB_getItem($_TABLES['nxform_definitions'], 'after_post_text', "id={$form_id}");
    if ($completion_msg == '') {
        echo COM_refresh($returnURL . '?msg=1&plugin=nexform');
    } else {
        echo COM_refresh($CONF_FE['public_url'] . "/complete.php?id={$form_id}");
    }
    exit;
} else {
    if (DB_count($_TABLES['nxform_definitions'], 'id', $id) == 1) {
        echo COM_siteHeader();
        if (isset($_GET['processid']) and isset($_GET['taskid'])) {
            $parms = array('processid' => $_GET['processid'], 'taskid' => $_GET['taskid']);
            echo nexform_showform($id, 0, 'view', $parms);
        } else {
            echo nexform_showform($id);
        }
        echo COM_siteFooter();
        exit;
    } else {
        echo COM_refresh($returnURL . '?msg=2&plugin=nexform');
        exit;
    }
}
예제 #3
0
// | This program 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 this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
//
require_once "../../../lib-common.php";
// Path to your lib-common.php
require_once $_CONF['path_system'] . 'classes/navbar.class.php';
$myvars = array('id', 'linkedforms');
ppGetData($myvars, true);
/* Show Form - Preview */
$retval = COM_siteHeader();
$LANG_NAVBAR = $LANG_FRM_ADMIN_NAVBAR;
$navbar = new navbar();
$navbar->add_menuitem($LANG_NAVBAR['1'], $_CONF['site_admin_url'] . '/plugins/nexform/index.php');
$navbar->add_menuitem($LANG_NAVBAR['3'], $_CONF['site_admin_url'] . '/plugins/nexform/index.php?op=editform&mode=edit&id=' . $id);
$navbar->add_menuitem($LANG_NAVBAR['4'], $_CONF['site_admin_url'] . '/plugins/nexform/index.php?op=displayfields&id=' . $id);
$navbar->add_menuitem($LANG_NAVBAR['9'], $_CONF['site_admin_url'] . '/plugins/nexform/report.php?&formid=' . $id);
$navbar->add_menuitem($LANG_NAVBAR['7'], $_CONF['site_admin_url'] . '/plugins/nexform/preview.php?id=' . $id);
$navbar->set_selected($LANG_NAVBAR['7']);
$retval .= $navbar->generate();
// $linkedforms: used to optionally only show pre linked or post linked forms. Valid values are: all, none, beforeonly, afternonly
$retval .= nexform_showform($id, 0, 'view', '', $linkedforms);
$retval .= COM_siteFooter();
echo $retval;
예제 #4
0
     $report_results .= nexform_showform($formid, $id, 'print');
     $report_results .= '</body></html>' . LB;
     break;
 case 'edit':
     $navbar = new navbar();
     if ($editrights) {
         $navbar->add_menuitem($LANG_NAVBAR['1'], $_CONF['site_admin_url'] . '/plugins/nexform/index.php');
     }
     $navbar->add_menuitem($LANG_NAVBAR['9'], $_CONF['site_admin_url'] . '/plugins/nexform/report.php?formid=' . $formid);
     $navbar->add_menuitem($LANG_NAVBAR['10'], $_CONF['site_admin_url'] . '/plugins/nexform/report.php?op=view&formid=' . $formid . '&id=' . $id);
     $navbar->set_selected($LANG_NAVBAR['10']);
     $report_results .= $navbar->generate();
     if ($editrights) {
         $report_results .= nexform_showform($formid, $id, 'edit');
     } else {
         $report_results .= nexform_showform($formid, $id, 'view');
     }
     break;
 case 'update':
     if ($editrights and DB_count($_TABLES['nxform_results'], 'id', $id) > 0) {
         nexform_dbupdate($formid, $id);
         $report_results = show_formresults($formid);
     } else {
         $report_results = show_formresults($formid);
     }
     break;
 case 'delete':
     if ($editrights) {
         DB_query("DELETE FROM {$_TABLES['nxform_results']} WHERE id='{$id}'");
     }
     $report_results = show_formresults($formid);
예제 #5
0
    echo "You do not have sufficient access.";
    echo "<p><button  onclick='javascript:history.go(-1)'>Return</button></p><br>";
    echo '</div>';
    echo COM_endBlock();
    echo COM_siteFooter();
    exit;
}
$LANG_NAVBAR = $LANG_FRM_ADMIN_NAVBAR;
$formname = DB_getItem($_TABLES['nxform_definitions'], 'name', "id='{$id}'");
if ($epm == 1) {
    $resid = nexform_dbsave($id);
    $_GET['result'] = $resid;
    $result = $resid;
}
$report_results = "<link rel=\"stylesheet\" href=\"{$_CONF['layout_url']}/style.css\">\n";
$report_results .= nexform_showform($id, $result, 'print', '', '', $style);
//now we can delete from the temporary tables now that we are done displaying them.
if ($epm == 1) {
    $tmpres = DB_getItem($_TABLES['nxform_results'], 'related_results', "id={$resid}");
    DB_query("DELETE FROM {$_TABLES['nxform_results']} WHERE id={$resid};");
    DB_query("DELETE FROM {$_TABLES['nxform_resdata']} WHERE result_id={$resid};");
    DB_query("DELETE FROM {$_TABLES['nxform_restext']} WHERE result_id={$resid};");
    if ($tmpres != '') {
        $resids = explode(',', $tmpres);
        foreach ($resids as $resid) {
            DB_query("DELETE FROM {$_TABLES['nxform_results']} WHERE id={$resid};");
            DB_query("DELETE FROM {$_TABLES['nxform_resdata']} WHERE result_id={$resid};");
            DB_query("DELETE FROM {$_TABLES['nxform_restext']} WHERE result_id={$resid};");
        }
    }
}