first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
use ConvertForms\Helper;
jimport('joomla.filesystem.file');
$downloadKey = NRFramework\Functions::getDownloadKey();
// Display extension notices
\NRFramework\Notices\Notices::getInstance([
'ext_element' => 'com_convertforms',
'ext_xml' => 'com_convertforms'
])->show();
$canAccessOptions = Helper::authorise('core.admin');
$canAccessForms = Helper::authorise('convertforms.forms.manage');
$canAccessSubmissions = Helper::authorise('convertforms.submissions.manage');
$canAccessCampaigns = Helper::authorise('convertforms.campaigns.manage');
$canAccessAddons = Helper::authorise('convertforms.addons.manage');
?>
<div class="<?php echo defined('nrJ4') ? 'row' : 'row-fluid' ?> dashboard">
<span class="span8 col-md-8">
<div class="<?php echo defined('nrJ4') ? 'row' : 'row-fluid' ?>">
<div class="col">
<ul class="nr-icons">
<?php if ($canAccessForms) { ?>
<li>
<a href="javascript: newForm()">
<span class="icon-pencil-2"></span>
<span><?php echo JText::_("COM_CONVERTFORMS_NEW_FORM") ?></span>
</a>
</li>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_convertforms&view=forms">
<span class="icon-list-2"></span>
<span><?php echo JText::_("COM_CONVERTFORMS_FORMS") ?></span>
</a>
</li>
<?php } ?>
<?php if ($canAccessCampaigns) { ?>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_convertforms&view=campaigns">
<span class="cf-icon-megaphone"></span>
<span><?php echo JText::_("COM_CONVERTFORMS_CAMPAIGNS") ?></span>
</a>
</li>
<?php } ?>
<?php if ($canAccessSubmissions) { ?>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_convertforms&view=conversions">
<span class="icon-users"></span>
<span><?php echo JText::_("COM_CONVERTFORMS_SUBMISSIONS") ?></span>
</a>
</li>
<?php } ?>
<?php if ($canAccessAddons) { ?>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_convertforms&view=addons">
<span class="icon-puzzle"></span>
<span><?php echo JText::_("COM_CONVERTFORMS_ADDONS") ?></span>
</a>
</li>
<?php } ?>
<?php if ($canAccessForms) { ?>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_convertforms&view=forms&layout=import">
<span class="icon-box-remove"></span>
<span><?php echo JText::_("NR_IMPORT") ?></span>
</a>
</li>
<?php } ?>
<?php if ($canAccessOptions) { ?>
<li>
<a href="<?php echo JURI::base() ?>index.php?option=com_config&view=component&component=com_convertforms&path=&return=<?php echo MD5(JURI::base()."index.php?option=com_convertforms") ?>">
<span class="icon-options"></span>
<span><?php echo JText::_("JOPTIONS") ?></span>
</a>
</li>
<?php } ?>
<li>
<a href="https://www.tassos.gr/joomla-extensions/convert-forms/docs" target="_blank">
<span class="icon-info"></span>
<span><?php echo JText::_("NR_KNOWLEDGEBASE")?></span>
</a>
</li>
</ul>
</div>
</div>
<?php if ($canAccessSubmissions) { ?>
<div class="<?php echo defined('nrJ4') ? 'row mt-3' : 'row-fluid' ?>" style="margin-top:10px;">
<div class="span6 col">
<div class="nr-well-white">
<h3><?php echo JText::_("COM_CONVERTFORMS_SUBMISSIONS") ?></h3>
<?php include "panel.stats.php"; ?>
</div>
</div>
<div class="span6 col">
<div class="nr-well-white">
<h3><?php echo JText::_('COM_CONVERTFORMS_LATEST_SUBMISSIONS') ?></h3>
<?php include "latest.leads.php"; ?>
</div>
</div>
</div>
<?php } ?>
</span>
<span class="span4 col-md-4">
<?php echo JHtml::_('bootstrap.startAccordion', "info", array('active' => 'slide0')); ?>
<!-- Information Slide -->
<?php
echo JHtml::_('bootstrap.addSlide', "info", JText::_("NR_INFORMATION"), 'slide0');
include "panel.info.php";
echo JHtml::_('bootstrap.endSlide');
?>
<!-- Documentation Slide -->
<?php
echo JHtml::_('bootstrap.addSlide', "info", JText::_("NR_KNOWLEDGEBASE"), 'slide1');
include "panel.docs.php";
echo JHtml::_('bootstrap.endSlide');
?>
<!-- Translations Slide -->
<?php
echo JHtml::_('bootstrap.addSlide', "info", JText::_("NR_HELP_WITH_TRANSLATIONS"), 'slide2');
include "panel.translations.php";
echo JHtml::_('bootstrap.endSlide');
?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
</span>
</div>
<?php include_once(JPATH_COMPONENT_ADMINISTRATOR . '/layouts/footer.php'); ?>
<script>
function newForm() {
jQuery("#cfSelectTemplate").modal("show");
}
</script>

View File

@@ -0,0 +1,68 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php if (count($this->latestleads)) { ?>
<table class="table nrTable">
<thead>
<tr>
<th><?php echo JText::_("COM_CONVERTFORMS_EMAIL") ?></th>
<th><?php echo JText::_("COM_CONVERTFORMS_FORM") ?></th>
<th width="30%"><?php echo JText::_("JDATE") ?></th>
</tr>
<tbody>
<?php foreach ($this->latestleads as $key => $lead) { ?>
<tr class="<?php echo isset($lead->params->sync_error) ? "error" : "" ?>">
<td>
<?php
$email = '';
if (!$lead->params)
{
continue;
}
foreach ($lead->params as $param_key => $param_value)
{
if (strtolower($param_key) == 'email')
{
$email = $param_value;
break;
}
}
echo $email;
?>
<?php if (isset($lead->params->sync_error)) { ?>
<span class="hasPopover icon icon-info"
data-placement="top"
data-content="<?php echo $lead->params->sync_error ?>"
style="color:red;">
</span>
<?php } ?>
</td>
<td><?php echo $lead->form_name ?></td>
<td><?php echo $lead->created; ?></td>
</tr>
<?php } ?>
</tbody>
</thead>
</table>
<?php } else { ?>
<div class="text-center">
<?php echo ConvertForms\Helper::noItemsFound(); ?>
</div>
<?php } ?>

View File

@@ -0,0 +1,33 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
$docs = array(
"Getting Started with Convert Forms" => "getting-started-with-convert-forms",
"How to use the Form Designer" => "how-to-use-the-form-designer",
"How to display a form on the frontend" => "how-to-display-a-form-on-the-frontend",
"Sync Submissions with ActiveCampaign" => "sync-leads-with-activecampaign",
"Sync Submissions with GetResponse" => "sync-leads-with-getresponse",
"Sync Submissions with MailChimp" => "sync-leads-with-mailchimp",
"How to use Convert Forms as a popup" => "how-to-use-convert-forms-as-a-popup",
);
$docHome = "http://www.tassos.gr/joomla-extensions/convert-forms/docs/";
?>
<ul>
<?php foreach ($docs as $title => $url) { ?>
<li><a target="_blank" href="<?php echo $docHome; ?><?php echo $url?>"><?php echo $title ?></a></li>
<?php } ?>
</ul>

View File

@@ -0,0 +1,56 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
?>
<table class="table nrTable noBorder">
<tbody>
<tr>
<td><?php echo JText::_("NR_EXTENSION"); ?></td>
<td><?php echo JText::_("COM_CONVERTFORMS"); ?></td>
</tr>
<tr>
<td><?php echo JText::_("NR_VERSION"); ?></td>
<td><?php echo NRFramework\Functions::getExtensionVersion("com_convertforms", true); ?>
<a href="https://www.tassos.gr/joomla-extensions/convert-forms//changelog"><?php echo JText::_("NR_CHANGELOG"); ?></a>
</td>
</tr>
<tr>
<td><?php echo JText::_("NR_DOWNLOAD_KEY"); ?></td>
<td>
<?php if ($downloadKey) { ?>
<span class="badge bg-success label-success"><?php echo JText::_("NR_OK"); ?></span>
<?php } else { ?>
<span class="badge bg-danger label-important"><?php echo JText::_("NR_MISSING"); ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo JText::_("NR_LICENSE"); ?></td>
<td><a href="http://www.tassos.gr/license" target="_blank">GNU GPLv3 Commercial</td>
</tr>
<tr>
<td><?php echo JText::_("NR_AUTHOR"); ?></td>
<td>Tassos Marinos - <a href="http://www.tassos.gr" target="_blank">www.tassos.gr</td>
</tr>
<tr>
<td><?php echo JText::_("NR_FOLLOWME"); ?></td>
<td>
<a href="#" onclick="window.open('https://twitter.com/intent/follow?screen_name=tassosm','tassos.gr','width=500,height=500');">
<?php echo JText::sprintf("NR_FOLLOW", "@mtassos") ?>
</a>
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,61 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
use ConvertForms\Analytics;
?>
<table width="100%" class="table nrTable">
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_LAST_YEAR") ?></td>
<td class="text-right"><?php echo Analytics::getRows('last_year') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_THIS_YEAR") ?></td>
<td class="text-right"><?php echo Analytics::getRows('this_year') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_LAST_MONTH") ?></td>
<td class="text-right"><?php echo Analytics::getRows('last_month') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_THIS_MONTH") ?></td>
<td class="text-right"><?php echo Analytics::getRows('this_month') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_LAST_7_DAYS") ?></td>
<td class="text-right"><?php echo Analytics::getRows('range', ['created_from' => '-7 day', 'created_to' => 'now']) ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_YESTERDAY") ?></td>
<td class="text-right"><?php echo Analytics::getRows('yesterday') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_TODAY") ?></td>
<td class="text-right"><?php echo Analytics::getRows('today') ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_AVG_DAY") ?></td>
<td class="text-right"><?php echo Analytics::getLeadsAverageThisMonth() ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_PROJECTION") ?></td>
<td class="text-right"><?php echo Analytics::getMonthProjection(); ?></td>
</tr>
<tr>
<td><?php echo JText::_("COM_CONVERTFORMS_TOTAL") ?></td>
<td class="text-right"><?php echo Analytics::getRows(); ?></td>
</tr>
</table>

View File

@@ -0,0 +1,20 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
?>
<p>
<?php echo JText::sprintf("NR_TRANSLATE_INTEREST", JText::_("COM_CONVERTFORMS")); ?>
<a href="https://www.transifex.com/tassosgr/convert-forms/" target="_blank"><?php echo JText::_("NR_TRANSIFEX_REQUEST") ?></a>.
</p>

View File

@@ -0,0 +1,50 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
class ConvertFormsViewConvertForms extends JViewLegacy
{
/**
* Items view display method
*
* @return void
*/
function display($tpl = null)
{
$this->config = JComponentHelper::getParams('com_convertforms');
$model = \JModelLegacy::getInstance('Conversions', 'ConvertFormsModel', ['ignore_request' => true]);
$model->setState('list.limit', 10);
$model->setState('filter.state', 1);
$this->latestleads = $model->getItems();
ConvertForms\Helper::renderSelectTemplateModal();
if (!defined('nrJ4'))
{
JHTML::_('behavior.modal');
JHtml::_('bootstrap.popover');
}
JHtml::stylesheet('jui/icomoon.css', array(), true);
JToolBarHelper::title(JText::_('COM_CONVERTFORMS'));
// Display the template
parent::display($tpl);
}
}