Ejemplo n.º 1
0
 public function conversionHelperHTML($content, $obj)
 {
     $cc = $content[0];
     if (is_array($cc)) {
         $dname = $cc[0] . '_' . $cc[1];
         if (!isset($obj->{$cc[0]}[$cc[1]])) {
             return array($dname => '');
         }
         $dvalue = $obj->{$cc[0]}[$cc[1]];
     } else {
         $dname = $cc;
         if (!isset($obj->{$cc})) {
             return array($dname => '');
         }
         $dvalue = $obj->{$cc};
     }
     if (isset($content[1])) {
         $type = $content[1];
     } else {
         $type = null;
     }
     if (isset($_POST['noformat_newlines'])) {
         $nnl = ', ';
     } else {
         $nnl = ',<br />';
     }
     if (!empty($type)) {
         $types = explode(' ', $type);
         if (is_array($dvalue)) {
             foreach ($dvalue as $dv) {
                 if (is_array($dv)) {
                     return array($dname => '');
                 }
             }
             $dvalue = implode(',', $dvalue);
         }
         foreach ($types as $tt) {
             switch ($tt) {
                 case 'notags':
                     $dvalue = strip_tags($dvalue);
                     break;
                 case 'limit32':
                     $dvalue = substr($dvalue, 0, 32);
                     break;
                 case 'smartlimit':
                     if (isset($_POST['truncation_length'])) {
                         $truncation = $_POST['truncation_length'];
                     } else {
                         $truncation = 42;
                     }
                     if ($truncation > 12) {
                         $tls = 12;
                     } else {
                         $tls = $truncation / 2;
                     }
                     if (is_array($dvalue)) {
                         $vv = array();
                         foreach ($dvalue as $val) {
                             if (strlen($val) > $truncation) {
                                 $vv[] = substr($val, 0, $truncation - $tls) . '<strong title="' . htmlentities($val) . '">[...]</strong>' . substr($val, -$tls, $tls);
                             } else {
                                 $vv[] = $val;
                             }
                         }
                         $dvalue = implode($nnl, $vv);
                     } else {
                         if (strlen($dvalue) > $truncation) {
                             $dvalue = substr($dvalue, 0, $truncation - $tls) . '<strong title="' . htmlentities($dvalue) . '">[...]</strong>' . substr($dvalue, -$tls, $tls);
                         }
                     }
                     break;
                 case 'list':
                     if (is_array($dvalue)) {
                         $vv = array();
                         foreach ($dvalue as $val) {
                             if ($val == 0) {
                                 $vv[] = '--';
                             } else {
                                 $vv[] = "#" . $val . ":&nbsp;<strong>" . $this->lists[$content[2]][$val] . "</strong>";
                             }
                         }
                         $dvalue = implode($nnl, $vv);
                     } else {
                         if ($dvalue == 0) {
                             $dvalue = '--';
                         } else {
                             $dvalue = "#" . $dvalue . ":&nbsp;<strong>" . $this->lists[$content[2]][$dvalue] . "</strong>";
                         }
                     }
                     break;
                 case 'haslink':
                     if (isset($content[3])) {
                         $tasklink = $content[2] . "&amp;" . $content[3] . "=" . $obj->{$content[3]};
                         $dvalue = AECToolbox::backendTaskLink($tasklink, $dvalue);
                     } else {
                         $dvalue = AECToolbox::backendTaskLink($content[2], $dvalue);
                     }
                     break;
             }
         }
     }
     return array($dname => $dvalue);
 }
Ejemplo n.º 2
0
        public function splash($pckgs, $errors)
        {
            ?>
			<link rel="stylesheet" type="text/css" media="all" href="<?php 
            echo JURI::root();
            ?>
media/com_acctexp/css/admin.css?rev=<?php 
            echo _AEC_REVISION;
            ?>
" />
			<style type="text/css">
				dl#system-message {
					display: none;
				}
				table.adminform tr:first-child {
					display: none;
				}
				table.adminform {
					border: none;
					background: none;
				}
			</style>
			<div style="width: 1024px; margin: 12px auto;">
			<div class="installmain">
				<div style="width: 100%; height: 290px;"></div>
				<?php 
            if ($errors) {
                echo '<div style="color: #f00; text-align: left; border: 1px solid #foo; background-color: #fff; margin: 12px; padding: 8px;">' . "\n" . JText::_('AEC_INST_ERRORS') . '<ul>' . "\n";
                foreach ($errors as $error) {
                    if (is_array($error)) {
                        echo '<li>' . $error[0] . ' - ' . $error[1] . '</li>';
                    } else {
                        echo '<li>' . $error . '</li>';
                    }
                }
                echo '</ul>' . "\n" . '</div>' . "\n";
            }
            ?>
				<div class="<?php 
            echo $pckgs ? 'packages-installed' : 'packages-none';
            ?>
">
					<p><?php 
            echo $pckgs ? JText::_('AEC_INST_PACKAGES_YES') : JText::_('AEC_INST_PACKAGES_NO');
            ?>
</p>
				</div>
				<div class="install-golink">
					<p><a href="index.php?option=com_acctexp"><?php 
            echo JText::_('Use AEC Now');
            ?>
!</a></p>
				</div>
			</div>
			<div style="float: left; width: 300px; margin: 0 50px;">
				<div style="margin-left:auto;margin-right:auto;text-align:center;">
					<p><img src="<?php 
            echo JURI::root();
            ?>
media/com_acctexp/images/admin/icons/aec_logo_big.png" border="0" alt="" /></p>
					<p><strong>Account Expiration Control</strong> Component - Version <?php 
            echo str_replace('beta', '&beta;', _AEC_VERSION);
            ?>
 - Revision <?php 
            echo _AEC_REVISION;
            ?>
</p>
					<p><?php 
            echo JText::_('AEC_FOOT_TX_CHOOSING');
            ?>
</p>
					<div style="margin: 0 auto;text-align:center;">
						<a href="https://www.valanx.org" target="_blank"><img src="<?php 
            echo JURI::root();
            ?>
media/com_acctexp/images/admin/gfx/valanx_logo.png" border="0" alt="valanx.org" /></a>
						<p><?php 
            echo JText::_('AEC_FOOT_TX_GPL');
            ?>
</p>
					</div>
					<p><?php 
            printf(JText::_('AEC_FOOT_CREDIT'), AECToolbox::backendTaskLink('credits', JText::_('AEC_FOOT_CREDIT_LTEXT')));
            ?>
</p>
				</div>
			</div>
			</div>
			<?php 
        }
Ejemplo n.º 3
0
    static function central()
    {
        HTML_myCommon::startCommon('aec-wrap-squared');
        $linkroot = "index.php?option=com_acctexp&amp;task=";
        ?>
		<div class="container">
			<div class="row">
				<div id="aec-center">
					<div class="aec-center-block col-md-8">
						<table class="diorama">
							<tr>
								<td colspan="13">
									<h2>Welcome to AEC!</h2>
									<hr class="topslim" />
								</td>
							</tr>
							<tr>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=ItemGroup', 'itemgroups', JText::_('AEC_CENTR_GROUPS'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div><?php 
        echo aecHTML::Icon('chevron-left', ' diorama-icon-w');
        ?>
</div></td>
								<td><div class="cell-wrapper"><div class="dioarama-corner-w-s"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Membership&status=Manual', 'manual', JText::_('AEC_CENTR_MANUAL'));
        ?>
</div></td>
								<td></td>
								<td></td>
								<td></td>
								<td class="important"><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'stats', 'stats', JText::_('AEC_CENTR_STATS'));
        ?>
</div></td>
								<td></td>
								<td></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Membership&status=Excluded', 'excluded', JText::_('AEC_CENTR_EXCLUDED'));
        ?>
</div></td>
								<td></td>
							</tr>
							<tr>
								<td><div class="cell-wrapper-slim-bar"><?php 
        echo aecHTML::Icon('chevron-up', ' diorama-icon-n');
        ?>
<div class="dioarama-corner-n-s"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><div class="dioarama-corner-n-s"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><div class="dioarama-corner-n-s"></div><?php 
        echo aecHTML::Icon('chevron-down', ' diorama-icon-s');
        ?>
</div></td>
								<td colspan="3"></td>
								<td><div class="cell-wrapper-slim-bar"><?php 
        echo aecHTML::Icon('chevron-up', ' diorama-icon-n');
        ?>
<div class="dioarama-corner-n-s"></div></div></td>
								<td></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><?php 
        echo aecHTML::Icon('chevron-up', ' diorama-icon-n');
        ?>
<div class="dioarama-corner-n-s"></div></div></td>
							</tr>
							<tr>
								<td><div class="cell-wrapper"><div class="dioarama-corner-n-s-f"></div></div></td>
								<td></td>
								<td class="important"><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=SubscriptionPlan', 'plans', JText::_('AEC_CENTR_PLANS'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div><?php 
        echo aecHTML::Icon('chevron-right', ' diorama-icon-e');
        ?>
</div></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Invoice', 'invoices', JText::_('AEC_CENTR_V_INVOICES'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div><?php 
        echo aecHTML::Icon('chevron-right', ' diorama-icon-e');
        ?>
</div></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Processor', 'processors', JText::_('AEC_CENTR_PROCESSORS'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div><?php 
        echo aecHTML::Icon('chevron-right', ' diorama-icon-e');
        ?>
</div></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=History', 'history', JText::_('AEC_CENTR_M_VIEW_HISTORY'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div></div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div><?php 
        echo aecHTML::Icon('chevron-right', ' diorama-icon-e');
        ?>
</div></td>
								<td class="important"><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Membership&status=Active', 'active', JText::_('Members'));
        ?>
</div></td>
								<td></td>
							</tr>
							<tr>
								<td><div class="cell-wrapper-slim-bar"><div class="dioarama-corner-n-s-f"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><?php 
        echo aecHTML::Icon('chevron-up', ' diorama-icon-n');
        ?>
<div class="dioarama-corner-n-s"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><?php 
        echo aecHTML::Icon('chevron-up', ' diorama-icon-n');
        ?>
<div class="dioarama-corner-n-s"></div></div></td>
								<td colspan="3"></td>
								<td><div class="cell-wrapper-slim-bar"><div class="dioarama-corner-n-s"></div><?php 
        echo aecHTML::Icon('chevron-down', ' diorama-icon-s');
        ?>
</div></td>
								<td></td>
								<td></td>
								<td><div class="cell-wrapper-slim-bar"><div class="dioarama-corner-n-s"></div><?php 
        echo aecHTML::Icon('chevron-down', ' diorama-icon-s');
        ?>
</div></td>
							</tr>
							<tr>
								<td class="important"><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=MicroIntegration', 'microintegrations', JText::_('AEC_CENTR_M_INTEGRATION'));
        ?>
</div></td>
								<td><div class="cell-wrapper-slim"><div class="dioarama-corner-w-e"></div></div></td>
								<td><div class="cell-wrapper"><div class="dioarama-corner-e-n"></div></div></td>
								<td></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Coupon', 'coupons', JText::_('AEC_CENTR_COUPONS'));
        ?>
</div></td>
								<td></td>
								<td></td>
								<td></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Export&type=sales', 'export', JText::_('AEC_CENTR_EXPORT_SALES'));
        ?>
</div></td>
								<td></td>
								<td></td>
								<td><div class="cell-wrapper"><?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Export&type=members', 'export', JText::_('AEC_CENTR_EXPORT_MEMBERS'));
        ?>
</div></td>
								<td></td>
							</tr>
							<tr><td colspan="12"></td></tr>
							<tr>
								<td colspan="3">
									<div class="explain-block">
										<h6>Payment Plans</h6>
										<p>In AEC, what you sell to your users is called <strong>Payment Plans</strong>.<br />You can put them into <strong>Plans Groups</strong> for easy access and administration.</p><hr /><p>Both plans and plan groups can have <strong>Micro Integrations</strong> attached, which are pretty much like joomla plugins for your memberships, just more versatile.</p>
									</div>
								</td>
								<td></td>
								<td colspan="3">
									<div class="explain-block">
										<h6>Invoices &amp; Payment</h6>
										<p>To purchase a membership, a user first has to create an <strong>Invoice</strong> for it - during registration, or afterwards. That invoice can then be paid using a <strong>Payment Processor</strong>.</p><hr /><p>You can use <strong>Coupons</strong> to offer discounts to your customers.<br />If a user has no membership record in AEC, the account shows up under <strong>Non Members</strong>.</p>
									</div>
								</td>
								<td></td>
								<td colspan="4">
									<div class="explain-block">
										<h6>Transactions &amp; Memberships</h6>
										<p>Successful <strong>Transactions</strong> apply memberships to users. You can look them up in the list or as <strong>Statistics</strong>. Or you can <strong>Export</strong> them.</p><hr /><p>Likewise, you can track <strong>Members</strong> and modify their accounts or <strong>Export</strong> them as well.<br />If a member should not be subject to expiration of their account, you can <strong>exclude</strong> them from expiring.</p>
									</div>
								</td>
							</tr>
						</table>
					</div>
					<div class="aec-center-block aec-center-block-half col-md-4">
						<h2>Template &amp; Settings</h2>
						<hr class="topslim" />
						<div class="row">
							<div class="col-sm-12 col-md-6 col-lg-12">
								<div>
									<?php 
        HTML_AcctExp::quickiconButton($linkroot . 'edit&entity=Settings', 'settings', JText::_('AEC_CENTR_SETTINGS'));
        ?>
									<p>Change the way AEC behaves.</p>
									<br/>
								</div>
							</div>
							<div class="col-sm-12 col-md-6 col-lg-12">
								<div>
									<?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Template', 'templates', JText::_('AEC_CENTR_TEMPLATES'));
        ?>
									<p>Change what AEC looks like.</p>
								</div>
							</div>
							<div class="col-sm-12 col-md-6 col-lg-12">
								<div>
									<?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Toolbox', 'toolbox', JText::_('AEC_CENTR_TOOLBOX'));
        ?>
									<p>Nifty tools for AEC Experts.</p>
								</div>
							</div>
							<div class="col-sm-12 col-md-6 col-lg-12">
								<div>
									<?php 
        HTML_AcctExp::quickiconButton($linkroot . 'index&entity=Import', 'import', JText::_('AEC_CENTR_IMPORT'));
        ?>
									<p>Import Users into AEC.</p>
								</div>
							</div>
						</div>
					</div>
					<hr />
					<div id="aec-footer" class="col-sm-12">
						<hr/>
						<div class="col-sm-4">
							<img src="<?php 
        echo JURI::root();
        ?>
media/com_acctexp/images/admin/icons/aec_logo_big.png" border="0" alt="AEC" width="200" height="232" />
						</div>
						<div class="col-sm-4">
							<p><strong>Account Expiration Control</strong> Component<br />Version <?php 
        echo str_replace('beta', '&beta;', _AEC_VERSION);
        ?>
, Revision <?php 
        echo _AEC_REVISION;
        ?>
</p>
							<p><img src="<?php 
        echo JURI::root();
        ?>
media/com_acctexp/images/admin/gfx/aec_dist_title.jpg" border="0" alt="eta carinae nebula" class="dist-title" /></p>
							<p>Thank you for choosing AEC!</p>
							<div class="alert alert-success" style="margin-top: 24px; padding-right: 14px;">
								<p>If you use AEC, please post a rating and a review at the Joomla! Extensions Directory:</p>
								<p><a href="http://bit.ly/aecjedvote" target="_blank" class="btn btn-success" ><?php 
        echo aecHTML::Icon('heart');
        ?>
&nbsp;Go there now</a></p>
							</div>
						</div>
						<div class="col-sm-4">
							<a href="http://www.valanx.org"><img src="<?php 
        echo JURI::root();
        ?>
media/com_acctexp/images/admin/gfx/valanx_logo.png" border="0" alt="valanx" /></a>
							<p><?php 
        echo JText::_('AEC_FOOT_TX_GPL');
        ?>
</p>
							<p><?php 
        echo JText::_('AEC_FOOT_TX_SUBSCRIBE');
        ?>
</p>
							<p><?php 
        printf(JText::_('AEC_FOOT_CREDIT'), AECToolbox::backendTaskLink('credits', JText::_('AEC_FOOT_CREDIT_LTEXT')));
        ?>
</p>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php 
        HTML_myCommon::endCommon(false);
    }