52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
|
|
<?php
|
||
|
|
/******************************************************************************
|
||
|
|
MachForm
|
||
|
|
|
||
|
|
Copyright 2007 Appnitro Software. This code cannot be redistributed without
|
||
|
|
permission from http://www.appnitro.com/
|
||
|
|
|
||
|
|
More info at: http://www.appnitro.com/
|
||
|
|
******************************************************************************/
|
||
|
|
session_start();
|
||
|
|
|
||
|
|
require('config.php');
|
||
|
|
require('includes/language.php');
|
||
|
|
require('includes/check-session.php');
|
||
|
|
require('includes/db-core.php');
|
||
|
|
require('includes/common-validator.php');
|
||
|
|
require('includes/view-functions.php');
|
||
|
|
require('includes/post-functions.php');
|
||
|
|
require('includes/entry-functions.php');
|
||
|
|
require('includes/filter-functions.php');
|
||
|
|
require('includes/helper-functions.php');
|
||
|
|
|
||
|
|
|
||
|
|
connect_db();
|
||
|
|
|
||
|
|
$form_id = (int) trim($_REQUEST['form_id']);
|
||
|
|
$entry_id = (int) trim($_REQUEST['id']);
|
||
|
|
|
||
|
|
if(empty($form_id) || empty($entry_id)){
|
||
|
|
die('ID requerido.');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//set session value to override password protected form and captcha
|
||
|
|
$_SESSION['user_authenticated'] = $form_id;
|
||
|
|
|
||
|
|
//set session value to bypass unique checking
|
||
|
|
$_SESSION['edit_entry']['form_id'] = $form_id;
|
||
|
|
$_SESSION['edit_entry']['entry_id'] = $entry_id;
|
||
|
|
|
||
|
|
|
||
|
|
//get initial form values
|
||
|
|
$form_values = get_entry_values($form_id,$entry_id);
|
||
|
|
|
||
|
|
$markup = display_form($form_id, $form_values, null, '', $entry_id);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
header("Content-Type: text/html; charset=UTF-8");
|
||
|
|
echo $markup;
|
||
|
|
|
||
|
|
?>
|