/**
 * 	Displays a EasyContactFormsCustomFormEntryFiles detailedMain view
 * 	record
 *
 * @param object $view
 * 	the EasyContactFormsCustomFormEntryFiles detailedMain view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getCustomFormEntryFilesDetailedMainViewRow($view, $obj, $i, $map)
{
    $obj->File = array('doctype' => 'CustomFormEntryFiles', 'docid' => $obj->get('id'), 'field' => 'File', 'tag' => 'a', 'content' => EasyContactFormsT::get('Download'));
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <input type='checkbox' id='<?php 
    echo $view->idJoin('cb', $obj->getId());
    ?>
' value='off' class='ufo-deletecb' onchange='this.value=(this.checked)?"on":"off";'/>
    </td>
    <td>
      <?php 
    echo $obj->get('id');
    ?>
    </td>
    <td>
      <?php 
    echo $obj->get('Description');
    ?>
    </td>
    <td>
      <?php 
    EasyContactFormsIHTML::getFileDownloadLink($obj->File);
    ?>
    </td>
  </tr>
	<?php 
}
/**
 * 	Displays a EasyContactFormsContactTypes main view record
 *
 * @param object $view
 * 	the EasyContactFormsContactTypes main view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getContactTypesMainViewRow($view, $obj, $i, $map)
{
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <input type='checkbox' id='<?php 
    echo $view->idJoin('cb', $obj->getId());
    ?>
' value='off' class='ufo-deletecb' onchange='this.value=(this.checked)?"on":"off";'/>
    </td>
    <td>
      <?php 
    echo $obj->get('id');
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('id');
    ?>
", t:"ContactTypes"})'>
        <?php 
    EasyContactFormsIHTML::echoStr($obj->get('Description'));
    ?>
      </a>
    </td>
  </tr>
	<?php 
}
/**
 * 	Displays a EasyContactFormsCustomFormEntryFiles main view record
 *
 * @param object $view
 * 	the EasyContactFormsCustomFormEntryFiles main view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getCustomFormEntryFilesMainViewRow($view, $obj, $i, $map)
{
    $obj->File = array('doctype' => 'CustomFormEntryFiles', 'docid' => $obj->get('id'), 'field' => 'File', 'tag' => 'a', 'content' => EasyContactFormsT::get('Download'));
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <input type='checkbox' id='<?php 
    echo $view->idJoin('cb', $obj->getId());
    ?>
' value='off' class='ufo-deletecb' onchange='this.value=(this.checked)?"on":"off";'/>
    </td>
    <td>
      <?php 
    echo $obj->get('id');
    ?>
    </td>
    <td>
      <?php 
    EasyContactFormsIHTML::echoDate($obj->get('Date'), EasyContactFormsApplicationSettings::getInstance()->getDateFormat('PHP'), 0);
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('CustomForms');
    ?>
", t:"CustomForms"})'>
        <?php 
    echo $obj->get('CustomFormsDescription');
    ?>
      </a>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('CustomFormsEntries');
    ?>
", t:"CustomFormsEntries"})'>
        <?php 
    echo $obj->get('CustomFormsEntriesDescription');
    ?>
      </a>
    </td>
    <td>
      <?php 
    echo $obj->get('Description');
    ?>
    </td>
    <td>
      <?php 
    EasyContactFormsIHTML::getFileDownloadLink($obj->File);
    ?>
    </td>
  </tr>
	<?php 
}
/**
 * 	Displays a EasyContactFormsCustomFormEntryStatistics detailedMain
 * 	view record
 *
 * @param object $view
 * 	the EasyContactFormsCustomFormEntryStatistics detailedMain view
 * 	object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getCustomFormEntryStatisticsDetailedMainViewRow($view, $obj, $i, $map)
{
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('CustomForms');
    ?>
", t:"CustomForms"})'>
        <?php 
    echo $obj->get('CustomFormsDescription');
    ?>
      </a>
    </td>
    <td>
      <?php 
    echo $obj->get('PageName');
    ?>
    </td>
    <td>
      <?php 
    echo $obj->get('Impressions');
    ?>
    </td>
    <td>
      <?php 
    echo $obj->get('TotalEntries');
    ?>
    </td>
    <td>
      <?php 
    echo round($obj->get('Conversion'), 2);
    ?>
&nbsp;%
    </td>
    <td>
      <?php 
    $obj->getShowHideButton($view->map);
    ?>
    </td>
    <td>
      <?php 
    echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('Reset'), 'id' => $obj->elId('Reset', $obj->getId()), 'events' => " onclick='ufo.resetFormPageStatistics(this, {$obj->jsconfig})'", 'iclass' => " class='icon_reset_dis ufo-id-link' ", 'bclass' => "ufo-imagebutton"));
    ?>
    </td>
  </tr>
	<?php 
}
/**
 * 	Displays a EasyContactFormsCustomForms manageMain view record
 *
 * @param object $view
 * 	the EasyContactFormsCustomForms manageMain view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getCustomFormsManageMainViewRow($view, $obj, $i, $map)
{
    $jsconf = json_decode(stripslashes($map['a']));
    $args = $jsconf->ca[0];
    $obj->addjsconfig = (object) array();
    $obj->addjsconfig->viewTarget = $args->mt . 'Div';
    $obj->addjsconfig->t = $args->mt;
    $obj->addjsconfig->m = 'mtmview';
    $obj->addjsconfig->m2 = 'addRow';
    $obj->addjsconfig->n = $args->t;
    $obj->addjsconfig->a = array();
    $obj->addjsconfig->a[] = (object) array('fld' => $args->n, 'oid' => $obj->getId());
    $obj->addjsconfig->a[] = (object) array('fld' => $args->fld, 'oid' => $args->oid);
    $obj->addjsconfig->a = json_encode($obj->addjsconfig->a);
    $obj->addjsconfig = EasyContactFormsUtils::toJs($obj->addjsconfig);
    $obj->id = "onclick='ufo.link({$obj->addjsconfig}, {$view->jsconfig})'";
    ?>
  <tr>
    <td class='firstcolumn'>
      <a id='<?php 
    echo $obj->elId('id', $obj->getId());
    ?>
' title='<?php 
    echo EasyContactFormsT::get('Add');
    ?>
' href='javascript:;' class='icon_button_add ufo-mtmlink-button' <?php 
    echo $obj->id;
    ?>
></a>
    </td>
    <td>
      <?php 
    echo $obj->get('id');
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('id');
    ?>
", t:"CustomForms"})'>
        <?php 
    EasyContactFormsIHTML::echoStr($obj->get('Description'));
    ?>
      </a>
    </td>
  </tr>
	<?php 
}
  </div>
  <div>
    <div class='viewtable'>
      <table class='vtable'>
        <tr>
          <th style='width:8px'>
            <input type='checkbox' class='ufo-id-link' style='margin:0' onchange='ufo.checkAll(this)'/>
          </th>
          <th style='width:30px'>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "id"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "Description"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "ShortCode"));
?>
          </th>
        </tr>
        <?php 
EasyContactFormsLayout::getRows($resultset, 'EasyContactFormsCustomForms', $obj, 'easy-contact-forms-customformsmainviewrow.php', 'getCustomFormsMainViewRow', $viewmap);
?>
      </table>
    </div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
 /**
  * 	dispatch
  *
  * @param  $dispmap
  * 
  *
  * @return
  * 
  */
 function dispatch($dispmap)
 {
     $dispmap = EasyContactFormsUtils::intercept($dispmap);
     if ($dispmap == null) {
         EasyContactFormsIHTML::getNotLoggedInHTML();
         return;
     }
     $method = 'get' . $this->type . 'Form';
     return $this->{$method}($dispmap);
 }
/**
 * 	Displays a EasyContactFormsUsers main view record
 *
 * @param object $view
 * 	the EasyContactFormsUsers main view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getUsersMainViewRow($view, $obj, $i, $map)
{
    $obj->Description = array();
    $obj->Description[] = $obj->get('Name');
    $obj->Description[] = $obj->get('Description');
    $obj->Description = EasyContactFormsUtils::vImplode(' ', $obj->Description);
    $usrname = EasyContactFormsDB::getValue("SELECT display_name  FROM #wp__users WHERE ID = '" . $obj->get('CMSId') . "'");
    if ($usrname) {
        $obj->CMSId = $usrname;
    } else {
        $obj->CMSId = '&nbsp;';
    }
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <input type='checkbox' id='<?php 
    echo $view->idJoin('cb', $obj->getId());
    ?>
' value='off' class='ufo-deletecb' onchange='this.value=(this.checked)?"on":"off";'/>
    </td>
    <td>
      <?php 
    echo $obj->get('id');
    ?>
    </td>
    <td>
      <a id='<?php 
    echo $obj->elId('Description', $obj->getId());
    ?>
' class='ufo-id-link' onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('id');
    ?>
", t:"Users"})' onmouseover='ufo.showInfo({t:"Users", m2:"getUserASList", oid:<?php 
    echo $obj->get('id');
    ?>
, m:"ajaxsuggest"}, this)'>
        <?php 
    echo $obj->Description;
    ?>
      </a>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('ContactType');
    ?>
", t:"ContactTypes"})'>
        <?php 
    echo $obj->get('ContactTypeDescription');
    ?>
      </a>
    </td>
    <td>
      <?php 
    EasyContactFormsIHTML::echoDate($obj->get('Birthday'), EasyContactFormsApplicationSettings::getInstance()->getDateFormat('PHP'), 0);
    ?>
    </td>
    <td>
      <?php 
    echo $obj->get('RoleDescription');
    ?>
    </td>
    <td>
      <?php 
    echo $obj->CMSId;
    ?>
    </td>
    <td>
      <?php 
    $a = $obj->get('email');
    if (!empty($a)) {
        ?>
        <a href='mailto:<?php 
        echo $a;
        ?>
'><?php 
        echo $a;
        ?>
</a>
      <?php 
    } else {
        echo '&nbsp;';
    }
    ?>
    </td>
  </tr>
	<?php 
}
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "ContactTypeDescription", 'label' => EasyContactFormsT::get('ContactType')));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "Birthday"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "RoleDescription", 'label' => EasyContactFormsT::get('Role')));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "CMSId"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "email"));
?>
          </th>
        </tr>
        <?php 
EasyContactFormsLayout::getRows($resultset, 'EasyContactFormsUsers', $obj, 'easy-contact-forms-usersmainviewrow.php', 'getUsersMainViewRow', $viewmap);
?>
      </table>
    </div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
echo EasyContactFormsT::get('Hint_ApplicationSettings_UseTinyMCE');
?>
' class='ufo-id-link'>
        <input type='checkbox' id='UseTinyMCE' value='<?php 
echo $obj->UseTinyMCE;
?>
' <?php 
echo $obj->UseTinyMCEChecked;
?>
 class='ufo-cb checkbox ufo-formvalue' onchange='this.value=(this.checked)?"on":"off"'>
        <label for='TinyMCEConfig' class='ufo-label-top'><?php 
echo EasyContactFormsT::get('TinyMCEConfig');
?>
</label>
        <textarea id='TinyMCEConfig' class='textinput ufo-textarea ufo-formvalue' style='width:100%;height:330px'><?php 
echo $obj->get('TinyMCEConfig');
?>
</textarea>
      </div>
    </div>
  </div>
  <div>
    <div class='ufo-float-left'>
      <?php 
echo EasyContactFormsIHTML::getButton(array('id' => "Apply", 'label' => EasyContactFormsT::get('Apply'), 'events' => " onclick='ufo.apply({$obj->jsconfig})'", 'iclass' => " class='icon_button_apply ufo-id-link' ", 'bclass' => "button internalimage"));
?>
      <input type='hidden' value='var c = {};c.id = "Apply";AppMan.addSubmit(c);' class='ufo-eval'>
    </div>
    <div style='clear:left'></div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
if (!$obj->isEmpty('Phone1')) {
    ?>
      <div>
        <label><?php 
    echo EasyContactFormsT::get('Phone1');
    ?>
</label>
        <?php 
    echo $obj->get('Phone1');
    ?>
      </div>
    <?php 
}
?>
    <?php 
if (!$obj->isEmpty('ContactField3')) {
    ?>
      <div class='ufo-as-list-hidden'>
        <label class='ufo-label-top'><?php 
    echo EasyContactFormsT::get('ContactField3');
    ?>
</label>
        <?php 
    EasyContactFormsIHTML::echoStr($obj->get('ContactField3'), '', 120);
    ?>
      </div>
    <?php 
}
?>
  </div>
    /**
     * 	getSettingsFormButton
     *
     * @param  $id
     * 
     * @param  $title
     * 
     * @param  $events
     * 
     * @param  $class
     * 
     *
     * @return
     * 
     */
    function getSettingsFormButton($id, $title, $events, $class)
    {
        ?>
		<div class='ufo-float-left'>
			<?php 
        echo EasyContactFormsIHTML::getButton(array('id' => $id, 'title' => $title, 'events' => $events, 'iclass' => " class='{$class} ufo-id-link' ", 'bclass' => "ufo-imagebutton"));
        ?>
		</div>
		<?php 
    }
 /**
  * 	overwritefile
  *
  * @param  $filename
  * 
  * @param  $text
  * 
  *
  * @return
  * 
  */
 function overwritefile($filename, $text)
 {
     if (is_file($filename)) {
         unlink($filename);
     }
     if (!($handle = fopen($filename, 'a'))) {
         EasyContactFormsIHTML::showMessage('Cannot open file (' . $filename . ')');
         exit;
     }
     if (fwrite($handle, $text) === FALSE) {
         EasyContactFormsIHTML::showMessage('Cannot write to file (' . $filename . ')');
         exit;
     }
     fclose($handle);
 }
            </select>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div>
    <div class='viewtable'>
      <table class='vtable'>
        <tr>
          <th style='width:18px'>
            &nbsp;
          </th>
          <th style='width:30px'>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "id"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "Description", 'label' => EasyContactFormsT::get('Name')));
?>
          </th>
        </tr>
        <?php 
EasyContactFormsLayout::getRows($resultset, 'EasyContactFormsUsers', $obj, 'easy-contact-forms-usersmanagemainviewrow.php', 'getUsersManageMainViewRow', $viewmap);
?>
      </table>
    </div>
  </div>
 *
 * 	EasyContactFormsCustomFormsEntries AS form html template
 *
 * 	@see EasyContactFormsCustomFormsEntries::getASForm()
 */
/*  Copyright championforms.com, 2012-2013 | http://championforms.com  
 * -----------------------------------------------------------
 * Easy Contact Forms
 *
 * This product is distributed under terms of the GNU General Public License. http://www.gnu.org/licenses/gpl-2.0.txt.
 * 
 */
?>
  <div class='ufo-as-form ufo-customformsentries'>
    <div>
      <?php 
EasyContactFormsIHTML::echoDate($obj->get('Date'), EasyContactFormsApplicationSettings::getInstance()->getDateFormat('PHP', TRUE), 0);
?>
    </div>
    <div class='ufo-as-list-hidden'>
      <?php 
EasyContactFormsIHTML::echoStr($obj->get('Content'), '', 3000);
?>
    </div>
    <div>
      <?php 
echo $obj->get('PageName');
?>
    </div>
  </div>
 /**
  * 	getObject. a function returing an instantiated object
  *
  * 	an object may be loaded as a classs or an instance
  *
  * @param string $type_name
  * 	A name of type to return an instance for
  * @param boolean $data
  * 	indicates if the object should be loaded as a 'stub' containing class
  * 	methods or there is a need to create a new object instance or
  * 	initialize the instance with data from the database
  * @param int $new_id
  * 	if the new objid is set this method returns object's instance from
  * 	the database. Creates a new object otherwise.
  *
  * @return object
  * 	returns eigther an object 'stub' having only class methods, or a real
  * 	'object' having initialized fields
  */
 function getObject($type_name, $data = FALSE, $new_id = NULL)
 {
     if (@(include_once 'easy-contact-forms-' . strtolower($type_name) . '.php')) {
         $classname = 'EasyContactForms' . $type_name;
         try {
             $inst = new $classname($data, $new_id);
             $valid = $inst->isValid();
             if ($data && !empty($new_id) && !$valid) {
                 return NULL;
             }
             return $inst;
         } catch (Exception $e) {
             return NULL;
         }
     } else {
         EasyContactFormsIHTML::getNotLoggedInHTML();
         exit;
     }
 }
 /**
  * 	getYouAreNotLoggedInMessage
  *
  * 	Prints a 'not logged in message'
  *
  */
 function getYouAreNotLoggedInMessage()
 {
     require_once 'easy-contact-forms-ihtml.php';
     return EasyContactFormsIHTML::getNotLoggedInHTML();
 }
 /**
  * 	protectedUpload
  *
  * 	takes a file from a temporary folder and registers it in the file
  * 	manager
  *
  * @param array $_uldmap
  * 	request data
  * @param array $filespecmap
  * 	file spec
  */
 function protectedUpload($_uldmap, $filespecmap = NULL)
 {
     $filespecmapnull = false;
     if (is_null($filespecmap)) {
         $filespecmapnull = true;
         $filerequestid = $_uldmap['t'] . '_' . $_uldmap['fld'] . '_' . $_uldmap['oid'];
         $filespecmap = $_FILES[$filerequestid];
     }
     if (!isset($filespecmap)) {
         return FALSE;
     }
     if ($filespecmap['error'] != UPLOAD_ERR_OK) {
         return FALSE;
     }
     $ds = DIRECTORY_SEPARATOR;
     $protect = 0;
     if (isset($_uldmap['protect'])) {
         $protect = $_uldmap['protect'] == "on" ? 1 : 0;
     }
     $oowner = isset($_uldmap['easycontactusr']) ? $_uldmap['easycontactusr']->id : 0;
     $filename = $filespecmap['name'];
     $tmpname = $filespecmap['tmp_name'];
     $filesize = $filespecmap['size'];
     $filetype = $filespecmap['type'];
     $Type = $_uldmap['t'];
     $fieldname = $_uldmap['fld'];
     $id = $_uldmap['oid'];
     $basename = EasyContactFormsUtils::subStringBefore($filename, ".");
     if ($protect && ($basename == NULL || preg_match('/^[A-Fa-f0-9]{32}$/', $basename))) {
         echo EasyContactFormsIHTML::showMessage(EasyContactFormsT::get('ImpossibleToPerformOperation'), 'warningMessage');
         return FALSE;
     }
     global $wpdb;
     $query = "SELECT\n\t\t\t\tCount\n\t\t\tFROM\n\t\t\t\t#wp__easycontactforms_files\n\t\t\tWHERE\n\t\t\t\tDoctype=%s\n\t\t\t\tAND Docid=%d\n\t\t\t\tAND Docfield=%s";
     $query = $wpdb->prepare($query, $Type, $id, $fieldname);
     $counter = EasyContactFormsDB::getValue($query);
     $counter = isset($counter) ? $counter : 0;
     $query = "SELECT\n\t\t\t\tid\n\t\t\tFROM\n\t\t\t\t#wp__easycontactforms_files\n\t\t\tWHERE\n\t\t\t\tDoctype=%s\n\t\t\t\tAND Docid=%d\n\t\t\t\tAND Docfield=%s";
     $query = $wpdb->prepare($query, $Type, $id, $fieldname);
     $fileid = EasyContactFormsDB::getValue($query);
     if (isset($fileid)) {
         EasyContactFormsFiles::deletefile($fileid);
         EasyContactFormsFiles::delete($fileid);
     }
     $file = EasyContactFormsClassLoader::getObject('Files', true);
     $file->set('Count', $counter);
     $file->set('Docfield', $fieldname);
     $file->set('Doctype', $Type);
     $file->set('Docid', $id);
     $file->set('Name', $filename);
     $file->set('Size', $filesize);
     $file->set('Type', $filetype);
     $file->set('Protected', $protect);
     $file->set('Webdir', 0);
     $file->set('ObjectOwner', $oowner);
     $filespec = (object) array();
     $filespec->protect = $protect;
     $filespec->fieldname = $fieldname;
     $filespec->docType = $Type;
     $filespec->filename = $filename;
     if ($Type == "Files") {
         $filespec->id = $file->get('id');
         $Storagename = $file->getStorageFileName($filespec);
         $file->set('Storagename', $Storagename);
         $file->set('Docid', $file->get('id'));
     } else {
         $filespec->id = $id;
         $Storagename = $file->getStorageFileName($filespec);
         $file->set('Storagename', $Storagename);
     }
     $file->save();
     $filedirectory = EASYCONTACTFORMS__fileUploadDir;
     if (!is_dir($filedirectory)) {
         if (!EasyContactFormsUtils::createFolder($filedirectory)) {
             return FALSE;
         }
     }
     $newpath = $filedirectory . $ds . $Storagename;
     if ($filespecmapnull) {
         if (!move_uploaded_file($tmpname, $newpath)) {
             return FALSE;
         }
     } else {
         rename($tmpname, $newpath);
     }
     return TRUE;
 }
            <input type='text' id='Notes' class='textinput ufo-text ufo-filtervalue' style='width:130px'>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div>
    <div class='viewtable'>
      <table class='vtable'>
        <tr>
          <th style='width:8px'>
            <input type='checkbox' class='ufo-id-link' style='margin:0' onchange='ufo.checkAll(this)'>
          </th>
          <th style='width:30px'>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "id"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "Description"));
?>
          </th>
        </tr>
        <?php 
EasyContactFormsLayout::getRows($resultset, 'EasyContactFormsContactTypes', $obj, 'easy-contact-forms-contacttypesmainviewrow.php', 'getContactTypesMainViewRow', $viewmap);
?>
      </table>
    </div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "Date"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "CustomFormsDescription", 'label' => EasyContactFormsT::get('CustomForm')));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "PageName"));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "UsersDescription", 'label' => EasyContactFormsT::get('User')));
?>
          </th>
          <th>
            <?php 
EasyContactFormsIHTML::getColumnHeader(array('view' => $obj, 'field' => "SiteUser"));
?>
          </th>
        </tr>
        <?php 
EasyContactFormsLayout::getRows($resultset, 'EasyContactFormsCustomFormsEntries', $obj, 'easy-contact-forms-customformsentriesmainviewrow.php', 'getCustomFormsEntriesMainViewRow', $viewmap);
?>
      </table>
    </div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
/**
 * 	Displays a EasyContactFormsCustomFormsEntries main view record
 *
 * @param object $view
 * 	the EasyContactFormsCustomFormsEntries main view object
 * @param object $obj
 * 	a db object
 * @param int $i
 * 	record index
 * @param array $map
 * 	request data
 */
function getCustomFormsEntriesMainViewRow($view, $obj, $i, $map)
{
    $usrname = EasyContactFormsDB::getValue("SELECT display_name  FROM #wp__users WHERE ID = '" . $obj->get('SiteUser') . "'");
    if ($usrname) {
        $obj->SiteUser = $usrname;
    } else {
        $obj->SiteUser = '******';
    }
    ?>
  <tr class='ufohighlight <?php 
    EasyContactFormsIHTML::getTrSwapClassName($i);
    ?>
'>
    <td class='firstcolumn'>
      <input type='checkbox' id='<?php 
    echo $view->idJoin('cb', $obj->getId());
    ?>
' value='off' class='ufo-deletecb' onchange='this.value=(this.checked)?"on":"off";'>
    </td>
    <td>
      <?php 
    $usr = $obj->get('Users');
    if (empty($usr)) {
        $cff = EasyContactFormsClassLoader::getObject('CustomFormFields');
        $cff->getSettingsFormButton('entry-add', EasyContactFormsT::get('CF_ProcessEntry'), "onclick='ufoCf.processEntry(" . $obj->get('id') . ", " . $view->jsconfig . ");'", 'icon_button_add');
    }
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('id');
    ?>
", t:"CustomFormsEntries"})' onmouseover='ufo.showInfo({t:"CustomFormsEntries", m2:"getASList", oid:<?php 
    echo $obj->get('id');
    ?>
, m:"ajaxsuggest"}, this)'>
        <?php 
    EasyContactFormsIHTML::echoStr($obj->get('id'));
    ?>
      </a>
    </td>
    <td>
      <?php 
    EasyContactFormsIHTML::echoDate($obj->get('Date'), EasyContactFormsApplicationSettings::getInstance()->getDateFormat('PHP', TRUE), 0);
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('CustomForms');
    ?>
", t:"CustomForms"})'>
        <?php 
    echo $obj->get('CustomFormsDescription');
    ?>
      </a>
    </td>
    <td>
      <?php 
    echo $obj->get('PageName');
    ?>
    </td>
    <td>
      <a onclick='ufo.redirect({m:"show", oid:"<?php 
    echo $obj->get('Users');
    ?>
", t:"Users"})'>
        <?php 
    echo $obj->get('UsersDescription');
    ?>
      </a>
    </td>
    <td>
      <?php 
    echo $obj->SiteUser;
    ?>
    </td>
  </tr>
	<?php 
}
    /**
     * 	getScroller
     *
     * 	Returns a view scroller
     *
     * @param object $obj
     * 	a page scroller configuration object
     *
     * @return string
     * 	html text
     */
    function getScroller($obj)
    {
        $scrpos = $obj->start;
        $showlist = isset($obj->showlist) ? $obj->showlist : TRUE;
        $count = min($obj->limit + $obj->start, $obj->rowCount);
        $options = isset($obj->scrolleroptions) ? $obj->scrolleroptions : array(5, 10, 25, 50);
        ?>
		<div class = 'scrollerpanel'>
			<input
				type = 'hidden'
				class = 'ufo-viewscrollervalues'
				id = 'start'
				value = '<?php 
        echo $obj->start;
        ?>
'>
			<input
				type = 'hidden'
				class = 'ufo-viewscrollervalues'
				id = 'rowcount'
				value = '<?php 
        echo $obj->rowCount;
        ?>
'>
			<div>
				<span class = 'label'>
					<?php 
        echo EasyContactFormsT::get('ScrollerRows');
        ?>
				</span>
			</div>
			<?php 
        if ($showlist) {
            ?>
				<div>
					<select
						class = 'scrollerlist ufo-viewscrollervalues'
						id = 'limit'
						onchange = 'ufo.filter(<?php 
            echo $obj->jsconfig;
            ?>
)'>
						<?php 
            echo EasyContactFormsIHTML::getScrollerStepsList($obj->limit, $options);
            ?>
					</select>
				</div>
			<?php 
        } else {
            ?>
				<input
					type = 'hidden'
					class = 'ufo-viewscrollervalues'
					id = 'limit'
					value = '<?php 
            echo $obj->limit;
            ?>
'>
			<?php 
        }
        ?>
			<div style = 'white-space:nowrap;'>
				<span class = 'label'>

					(<?php 
        echo $obj->start + 1;
        ?>
-<?php 
        echo $count . ' ' . EasyContactFormsT::get('Of') . ' ' . $obj->rowCount;
        ?>
)

				</span>
			</div>
			<div>

				<?php 
        echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerFirst'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', -2)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_first" '));
        ?>

			</div>
			<div>

				<?php 
        echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerBack'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', -1)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_prev" '));
        ?>

			</div>
			<div>

				<?php 
        echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerForward'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', 1)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_next" '));
        ?>

			</div>
			<div>

				<?php 
        echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerLast'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', 2)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_last" '));
        ?>

			</div>
		</div>
		<?php 
    }
]}}]", viewTarget:"CustomFormEntryFilesDiv", t:"CustomFormEntryFiles", m:"viewDetailed"}, [{property:"CustomFormsEntries", value:{values:[<?php 
echo $obj->get('id');
?>
]}}])' class='ufo-eval'>
        <div id='CustomFormEntryFilesDiv' class='innerview'></div>
      </div>
    </div>
  </div>
  <div>
    <div class='ufo-float-left'>
      <?php 
echo EasyContactFormsIHTML::getButton(array('label' => EasyContactFormsT::get('OK'), 'events' => " onclick='ufo.save({$obj->jsconfig})'", 'iclass' => " class='icon_button_save' ", 'bclass' => "button internalimage"));
?>
    </div>
    <div class='ufo-float-left'>
      <?php 
echo EasyContactFormsIHTML::getButton(array('label' => EasyContactFormsT::get('Back'), 'events' => " onclick='ufo.back()'", 'iclass' => " class='icon_button_back' ", 'bclass' => "button internalimage"));
?>
    </div>
    <div class='ufo-float-left'>
      <?php 
$query = "SELECT Options.Value FROM #wp__easycontactforms_options AS Options WHERE Options.Description = 'customformsentries_main_form_buttons'";
$plugs = EasyContactFormsDB::getObjects($query);
foreach ($plugs as $plug) {
    include ABSPATH . $plug->Value;
}
?>
    </div>
    <div style='clear:left'></div>
  </div><?php 
EasyContactFormsLayout::getFormBodyFooter();
 * 	@see EasyContactFormsCustomFormEntryStatistics
 * 	::getDetailedMainView()
 */
/*  Copyright championforms.com, 2012-2013 | http://championforms.com  
 * -----------------------------------------------------------
 * Easy Contact Forms
 *
 * This product is distributed under terms of the GNU General Public License. http://www.gnu.org/licenses/gpl-2.0.txt.
 * 
 */
?>
  <div>
    <div id='divCustomFormEntryStatisticsFilter' class='ufo-filter' style='width:330px;z-index:100'>
      <div class='ufofilterbutton'>
        <?php 
echo EasyContactFormsIHTML::getButton(array('label' => EasyContactFormsT::get('Filter'), 'events' => " onclick='ufo.filter({$obj->jsconfig});'", 'iclass' => " class='icon_filter_pane' ", 'bclass' => "button internalimage"));
?>
      </div>
      <div class='ufo-clear-both'></div>
      <div>
        <div>
          <div>
            <label for='<?php 
echo $obj->sId('PageName');
?>
'><?php 
echo EasyContactFormsT::get('PageName');
?>
</label>
            <select id='<?php 
echo $obj->sId('PageName');