<?php
require_once "config/config.php";
$smarty_installation->assign('WEB_URL_INSTALLATION',$_SESSION['OPTIONS']['WEB_URL']);
$web_url=$_SESSION['OPTIONS']['WEB_URL'];
$include_dir=$_SESSION['OPTIONS']['INCLUDE_DIR'] ;
require_once $include_dir."/phpmailer/Functions.php";
$phydir=PHYSICAL_DIR_INSTALLATION;
$cron3= "\"path to php installation\" -f ".$phydir."cronjobs/update_product_membership_status_expirestatus.php";
$cron3_wrap= wordwrap($cron3, 60, "<br />",true);
$cron3=$cron3_wrap;
$installationHtml = <<<EOD
<div id="content" class="setdiv">
<div id="full-contentdiv">
<div class="righttop">
<h2 align="center">
MembersGear installation is completed
</h2>
</div>
<div class="whole-page clear" style="font-family:Verdana;font-size:12px;text-align:left">
<!-- Place your content here -->
<table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="" align="center" class="tbset">
<tbody>
<tr>
<td class="right-side-text"><b><font size="3px"><center>Thank you for choosing MembersGear</center></font></b></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td class="left-side-text" style="border: 1px solid rgb(204, 204, 204); vertical-align: middle;" ><center><label><b>
Please note that the default Administrator's Username is:<font color="green" size="2"> admin</font> and Password is:<font color="green" size="2"> admin</font>
</b><label></center>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><b style="font-size:14px;">
Important Links:</b><div style="border-bottom:solid 1px #ccc;height:1px;padding-top:5px;"></div>
<div class="" style="margin: 5px 5px 8px 5px ! important; width: 100% ! important;">
<ul style="margin:0px !important;padding:5px 0px 0px 23px !important;list-style-type:decimal !important;font-size:12px">
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="$web_url/admin/admin_product_m.php">Create Product</a></li>
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="$web_url/admin/index.php">Login To Administrative Control Panel</a></li>
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="$web_url/admin/admin_configuration_email.php">Email Configuration</a></li>
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="$web_url/user_signup.php">User Signup Page</a></li>
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="$web_url/user_login.php">User Login Page</a></li>
<li style="float:none !important;padding-bottom:7px"><a style="font-size:13px;font-weight:normal;text-decoration:underline" target="_new" href="http://userguide.membersgear.com/">MembersGear Userguide</a></li>
</ul>
</div><br/>
</td>
</tr>
<tr>
<td> <b style="font-size:14px;"> Before using MembersGear, you need to do following:</b>
<div style="border-bottom:solid 1px #ccc;height:1px;padding-top:5px;"></div>
<ul style="margin:0px !important;padding:5px 0px 0px 28px !important;list-style-type:decimal !important;font-size:12px">
<li style="float:none !important;padding-bottom:5px">
<div style="padding-bottom:5px"> <font size="2px"><b>Setup Email and Global Canned E-mails:</b></font></div>
<table style="width:100%">
<tr>
<td>
<div style="padding-left:15px"><font face="verdana" size="2px">Make sure you have correct email setup.<br/></font><a href="$web_url/admin/admin_configuration_email.php" target="_new"><font color="red" style="font-weight:normal" size="2px;" > Click here to setup and test email configuration</font></a></div>
</td>
<td style="text-align:right;" valign="top">
<font color="green"><b>Skip if already done</b>
</td>
</tr>
</table>
</li>
<li style="float:none !important;padding-bottom:7px;padding-top:7px;">
<div style="padding-bottom:5px"> <font size="2px"><b>Create Product:</b></font></div>
<table style="width:100%">
<tr>
<td>
<div style="padding-left:15px"><font face="verdana" size="2px">For user signup page,It is necessary to set up at least one product!</font><br/> <a href="$web_url/admin/admin_product_m.php" target="_new" ><font style="font-weight:normal" color="red"> Click here to create your product </font></a> </div>
</td>
<td style="text-align:right;" valign="top">
<font color="green"><b>Skip if already done</b>
</td>
</tr>
</table>
</li>
<li style="float:none !important;padding-bottom:7px;padding-top:7px;">
<div style="padding-bottom:5px"> <font size="2px"><b>Setup cronjob for following file.This file must be scheduled to run on every 24 hours.</b></font></div>
<div style="padding-left:15px" id="cronNotes">
<table style="width:100%">
<tr>
<td >
<font face="verdana" size="2px">$cron3</font>
</td>
<td style="padding-left:13px;text-align:right" valign="top" >
<font face="verdana" size="2px" color="green">
<b>Last run on - <font color="red"> Never</font></b>
</font>
</td>
</tr>
</table>
<br/>
<b>Cronjob Example:</b><br/><br/>
/usr/bin/php -f $phydir cronjobs/update_product_membership_status_expirestatus.php
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div> </div>
<center>
<div class="comment-div" style="margin: 0px 0px 5px 5px ! important; width: 750px ! important;font-family:Verdana;font-size:12px;">
<strong>Note: You can access this page later on by going to Admin's Control Panel Header -> Installation Notes.</strong><br/>
</div>
</center>
</div>
</div>
</div>
</div>
EOD;
$sendemail=sendInstallationMail($_SESSION['OPTIONS']['ADMINISTRATOR_EMAIL_ADDRESS'],$_SESSION['OPTIONS']['PHPMAILER_EMAIL_FROM_NAME'],"MembersGear installation successful",$_SESSION['OPTIONS']['PHPMAILER_HOST'],$_SESSION['OPTIONS']['PHPMAILER_SMTPAUTH'],$_SESSION['OPTIONS']['SEND_EMAIL_METHOD'],$_SESSION['OPTIONS']['PHPMAILER_USERNAME'],$_SESSION['OPTIONS']['PHPMAILER_PASSWORD'],$_SESSION['OPTIONS']['PHPMAILER_PORT'],$installationHtml);
unset($_SESSION['OPTIONS']);
unset($_SESSION['PAYGEAR_INSTALLATION']);
unset($_SESSION['GLOBAL_INSTALLATION']);
unset($_SESSION['EMAIL_INSTALLATION']);
unset($_SESSION['VALIDATE_MEMBER_SITE']);
unset($_SESSION['DATABASE_INSTALLATION']);
unset($_SESSION['DEFAULT_ADMIN_INSTALLATION']);
unset($_SESSION['INSTALLATION_SUCC']);
// $cron3= $web_url."/cronjobs/update_product_membership_status_expirestatus.php";
// $cron3_wrap= wordwrap($cron3, 60, "<br />",true);
$smarty_installation->assign('cron3',$cron3);
$smarty_installation->assign('phydir',$phydir);
$smarty_installation->assign('cron3_last_exe_on','Never');
$smarty_installation->display('installation_finish.tpl');
?>