Пример #1
0
				</div>
				<div class="form-group">
					<button type="submit" name="addUser" class="btn btn-success"><?php 
    echo letheglobal_save;
    ?>
</button>
				</div>
			</form>
			<!-- ADD USER END -->
		<?php 
} else {
    if ($page_sub2 == 'edit') {
        echo '<h1>' . $pg_title . '<span class="help-block"><span class="text-primary">' . settings_edit_user . '</span></span></h1><hr>' . $pg_nav_buts;
        $opUser = $myconn->query("SELECT * FROM " . db_table_pref . "users WHERE ID=" . $ID . "") or die(mysqli_error($myconn));
        if (mysqli_num_rows($opUser) == 0) {
            echo errMod(letheglobal_record_not_found . '!', 'danger');
        } else {
            $opUserRs = $opUser->fetch_assoc();
            ?>
			<!-- EDIT USER START -->
			<form name="editCurrUser" method="POST" action="">
				<div class="form-group">
					<label for="usr_name"><?php 
            echo sh('IiIMsL5qIW') . letheglobal_name;
            ?>
</label>
					<input type="text" name="usr_name" id="usr_name" value="<?php 
            echo showIn($opUserRs['real_name'], 'input');
            ?>
" class="form-control autoWidth">
				</div>
Пример #2
0
		$(".datepick").datepicker({dateFormat: "dd-mm-yy"});
		$(".ionc").ionCheckRadio();
	</script>
	';
    die($fieldData);
}
/* Report Extra Info */
if ($pos == 'extInfo') {
    # Clicked URLs etc
    $extraInfo = '<h4 class="text-primary">' . autoresponder_extra_info . '</h4><hr>';
    $opData = $myconn->prepare("SELECT * FROM " . db_table_pref . "reports WHERE OID=" . set_org_id . " AND ID=?") or die(mysqli_error($myconn));
    $opData->bind_param('i', $ID);
    $opData->execute();
    $opData->store_result();
    if ($opData->num_rows == 0) {
        $extraInfo .= errMod(letheglobal_record_not_found, 'danger');
    } else {
        $extST = new Statement_Result($opData);
        $opData->fetch();
        $extraInfo .= letheglobal_e_mail . ': ' . showIn($extST->Get('email'), 'page') . '<br>';
        $extraInfo .= letheglobal_date . ': ' . setMyDate($extST->Get('add_date'), 2) . '<br>';
        $extraInfo .= letheglobal_clicks . ' / ' . letheglobal_opens . ' ' . autoresponder_hit . ': ' . showIn($extST->Get('hit_cnt'), 'page') . '<br>';
        $extraInfo .= autoresponder_extra_info . ': <hr>';
        if ($extST->Get('extra_info') != '') {
            $extraInfo .= '<pre>' . showIn($extST->Get('extra_info'), 'page') . '</pre>';
        }
    }
    $opData->close();
    echo $extraInfo;
}
?>
Пример #3
0
        #Success End
        ?>
<!-- Organization Add End -->
<?php 
    } else {
        if ($page_sub2 == 'edit') {
            #Edit
            ?>
<!-- Organization Edit Start -->
<?php 
            $opOrg = $myconn->prepare("SELECT * FROM " . db_table_pref . "users WHERE ID=? AND OID=" . set_org_id . "") or die(mysqli_error($myconn));
            $opOrg->bind_param('s', $ID);
            $opOrg->execute();
            $opOrg->store_result();
            if ($opOrg->num_rows == 0) {
                echo errMod('* ' . letheglobal_record_not_found . '', 'danger');
            } else {
                $sr = new Statement_Result($opOrg);
                $opOrg->fetch();
                echo '<h1>' . organizations_organization . '<span class="help-block"><span class="text-primary">' . organizations_edit_user . '</span></span></h1><hr>' . $errText;
                if (!isset($lethe->isSuccess) || $lethe->isSuccess == 0) {
                    $permPages = array();
                    $opPerList = $myconn->query("SELECT * FROM " . db_table_pref . "user_permissions WHERE UID=" . $sr->Get('ID') . "") or die(mysqli_error($myconn));
                    while ($opPerListRs = $opPerList->fetch_assoc()) {
                        $permPages[$opPerListRs['perm']] = '';
                    }
                    $opPerList->free();
                    ?>
<form action="" method="POST"  onsubmit="listbox_selectall('perm-sel-list', true);listbox_selectall('perm-all-list', true)">
	<div role="tabpanel">
Пример #4
0
</th>
						<th><?php 
echo newsletter_launch_date;
?>
</th>
						<th><?php 
echo letheglobal_status;
?>
</th>
					</tr>
				</thead>
				<tbody>
				<?php 
$recCamp = $myconn->query("SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC.ID,C.OID,C.subject,C.campaign_pos,C.campaign_type,C.launch_date,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCA.CID,CA.ar_type\n\t\t\t\t\t\t\t\t\t\t\t\t   FROM \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . db_table_pref . "campaigns AS C,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . db_table_pref . "campaign_ar AS CA\n\t\t\t\t\t\t\t\t\t\t\t\t  WHERE \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC.OID=" . set_org_id . " \n\t\t\t\t\t\t\t\t\t\t\t\t\tAND \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC.campaign_type=1 \n\t\t\t\t\t\t\t\t\t\t\t\t\tAND \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(C.campaign_pos=0 OR C.campaign_pos=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(CA.CID=C.ID)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . (LETHE_AUTH_VIEW_TYPE ? ' AND C.UID=' . LETHE_AUTH_ID . '' : '') . "\n\t\t\t\t\t\t\t\t\t\t\t   ORDER BY \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC.launch_date \n\t\t\t\t\t\t\t\t\t\t\t\t\tASC \n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 0,5") or die(mysqli_error($myconn));
if (mysqli_num_rows($recCamp) == 0) {
    echo '<tr><td colspan="3">' . errMod(letheglobal_record_not_found, 'danger') . '</td></tr>';
} else {
    include_once 'modules/lethe.autoresponder/mod.common.php';
    while ($recCampRs = $recCamp->fetch_assoc()) {
        ?>
					<tr>
						<td><?php 
        echo showIn($recCampRs['subject'], 'page');
        ?>
<br><span class="txxs help-block"><?php 
        echo $LETHE_AR_TYPES[$recCampRs['ar_type']];
        ?>
</span></td>
						<td><span <?php 
        echo 'data-countdown="' . setMyDate($recCampRs['launch_date'], 6) . '"';
        ?>
Пример #5
0
    public function buildForm()
    {
        global $myconn;
        $formData = '';
        if ($this->formID == 0) {
            $formIDs = 1;
        } else {
            $formIDs = $this->formID;
        }
        $opForms = $myconn->prepare("SELECT * FROM " . db_table_pref . "subscribe_forms WHERE OID=" . $this->OID . " AND " . (!$this->formID ? 'isSystem=?' : 'ID=?') . "") or die(mysqli_error($myconn));
        $opForms->bind_param('i', $formIDs);
        $opForms->execute();
        $opForms->store_result();
        if ($opForms->num_rows == 0) {
            $opForms->close();
            return errMod('Subscribe Form Error!', 'danger');
            die;
        }
        $sr = new Statement_Result($opForms);
        $opForms->fetch();
        $opForms->close();
        $formFields = array('form_view' => $sr->Get('form_view'), 'form_fields' => array());
        $formData .= '<div id="lethe-result"></div><form ' . ($sr->Get('form_view') == 1 ? 'class="form-inline"' : '') . ' name="' . $sr->Get('form_id') . '" id="' . $sr->Get('form_id') . '" method="POST" enctype="application/x-www-form-urlencoded" action="javascript:;">' . PHP_EOL;
        $formData .= '<input type="hidden" id="lethe_form" name="lethe_form" value="' . $sr->Get('form_id') . '">';
        $formData .= '<input type="hidden" id="lethe_oid" name="lethe_oid" value="' . set_org_public_key . '">';
        $opFields = $myconn->query("SELECT * FROM " . db_table_pref . "subscribe_form_fields WHERE FID=" . $sr->Get('ID') . " ORDER BY sorting ASC") or die(mysqli_error($myconn));
        if (mysqli_num_rows($opFields) == 0) {
            $formData .= errMod('Form fields can not be found', 'danger');
        } else {
            while ($opFieldsRs = $opFields->fetch_assoc()) {
                $formFields['form_fields'][] = array('field_id' => $opFieldsRs['ID'], 'field_name' => $opFieldsRs['field_name'], 'field_label' => $opFieldsRs['field_label'], 'field_type' => $opFieldsRs['field_type'], 'field_required' => $opFieldsRs['field_required'], 'field_pattern' => $opFieldsRs['field_pattern'], 'field_placeholder' => $opFieldsRs['field_placeholder'], 'field_data' => $opFieldsRs['field_data']);
            }
            $formData .= $this->formDesigner($formFields);
            $opFields->free();
        }
        $formData .= '</form>' . PHP_EOL;
        /* Ajax Code */
        $formData .= '<script type="text/javascript">' . PHP_EOL;
        $formData .= '
							$("#' . $sr->Get('form_id') . '").on("submit",function(){
							$.ajax({
								url: "' . lethe_root_url . 'lethe.newsletter.php?pos=subscribe",
								type: "POST",
								contentType: "application/x-www-form-urlencoded",
								crossDomain: true,
								data: $("#' . $sr->Get('form_id') . '").serialize(),
								success: function(data){
									$("#lethe-result").html(data);
									$("html,body").animate({scrollTop: $("#lethe-result").offset().top},"slow");
								},
								error: function(){
									$("#lethe-result").html("<div class=\\"alert alert-danger\\">' . subscribers_there_is_error_while_submit . '</div>");
								}
							});});' . PHP_EOL;
        $formData .= '</script>' . PHP_EOL;
        if (!$this->isPreviewForm) {
            /* Add JQuery */
            if ($sr->Get('include_jquery')) {
                $formData .= '<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>' . PHP_EOL;
            }
            /* Add JQuery UI */
            if ($sr->Get('include_jqueryui')) {
                $formData .= '
															<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
															<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>' . PHP_EOL;
            }
        }
        $formData = preg_replace('/\\s+/', ' ', $formData);
        $formDataAll = '<!-- LETHE NEWSLETTER -->' . PHP_EOL;
        $formDataAll .= $formData . PHP_EOL;
        $formDataAll .= '<!-- LETHE NEWSLETTER -->' . PHP_EOL;
        return $formDataAll;
    }
Пример #6
0
							});
						</script>';
                $errText = $succText;
                /* Parsing End */
                $handle->clean();
            } else {
                # Uploading Error
                $errText = errMod($handle->error, 'danger');
            }
            # Uploading Finished
        } else {
            $errText = errMod('* ' . subscribers_could_not_upload_file . '!', 'danger');
        }
        /* End Upload */
    } else {
        $errText = errMod($resultData, 'danger');
    }
}
?>

<?php 
echo '<h1>' . $pg_title . '<span class="help-block"><span class="text-primary">' . subscribers_export . ' / ' . subscribers_import . '</span></span></h1><hr>' . $pg_nav_buts . $errText;
/* Load Groups for All Sections */
$listGrps = array();
$opGroups = $myconn->query("SELECT \n\t\t\t\t\t\t\t\t\tSG.*,\n\t\t\t\t\t\t\t\t\t(SELECT COUNT(ID) FROM " . db_table_pref . "subscribers WHERE GID=SG.ID) AS sbr_cnt\n\t\t\t\t\t\t\t  FROM \n\t\t\t\t\t\t\t\t\t" . db_table_pref . "subscriber_groups AS SG\n\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t\tOID=" . set_org_id . " \n\t\t\t\t\t\t\t   AND \n\t\t\t\t\t\t\t\t\tisUnsubscribe=0 \n\t\t\t\t\t\t\t\t\t" . (LETHE_AUTH_VIEW_TYPE ? ' AND UID=' . LETHE_AUTH_ID . '' : '') . "\n\t\t\t\t\t\t  ORDER BY\n\t\t\t\t\t\t\t\t\tgroup_name\n\t\t\t\t\t\t\t   ASC\n\t\t\t\t\t\t\t") or die(mysqli_error($myconn));
while ($opGroupsRs = $opGroups->fetch_assoc()) {
    $listGrps[] = $opGroupsRs;
}
$opGroups->free();
?>
Пример #7
0
             }
         }
     }
     $opCamp->close();
 } else {
     if ($pos == 'rss') {
         /* Load Organization Settings */
         if (!isset($oid) || $oid == '') {
             die(errMod('Settings Could Not Be Loaded!', 'danger'));
         } else {
             $chkOrg = $myconn->prepare("SELECT ID,public_key FROM " . db_table_pref . "organizations WHERE public_key=?") or die(mysqli_error($myconn));
             $chkOrg->bind_param('s', $oid);
             $chkOrg->execute();
             $chkOrg->store_result();
             if ($chkOrg->num_rows == 0) {
                 die(errMod('Settings Could Not Be Loaded!', 'danger'));
             } else {
                 $srOrg = new Statement_Result($chkOrg);
                 $chkOrg->fetch();
                 include_once LETHE_ADMIN . DIRECTORY_SEPARATOR . 'inc/org_set.php';
                 $orgID = $LETHE_ORG_SETS['set_org_id'];
             }
         }
         if ($orgID != 0) {
             header("Content-type: text/xml");
             $rss_title = 'Newsletter RSS';
             $rssfeed = '<?xml version="1.0" encoding="UTF-8"?>';
             $rssfeed .= '<rss version="2.0">';
             $rssfeed .= '<channel>';
             $rssfeed .= '<title>' . rss_filter($rss_title) . '</title>';
             $rssfeed .= '<link>' . lethe_root_url . '</link>';
Пример #8
0
                $rcBody = $mailBody;
                $rcAltBody = $mailBody;
                $recData = array($rcMail => array('name' => $rcName, 'subject' => $rcSubject, 'body' => $rcBody, 'altbody' => $rcAltBody));
                $sendMail = new lethe();
                $sendMail->sub_mail_id = md5($rcMail . time());
                $sendMail->sub_mail_receiver = $recData;
                $sendMail->sysSubInit();
                if ($sendMail->sendPos) {
                    # Change Password
                    $upPass = $myconn->prepare("UPDATE " . db_table_pref . "users SET pass=? WHERE ID=" . (int) $srm->Get('ID') . "") or die(mysqli_error($myconn));
                    $upPass->bind_param('s', $newPassEnc);
                    $upPass->execute();
                    $upPass->close();
                    $pwrm_res = mysql_prep(errMod(subscribers_e_mail_sent_successfully, 'success'));
                } else {
                    $pwrm_res = mysql_prep(errMod(letheglobal_error_occured . '<br>ERROR:' . $sendMail->sendingErrors, 'danger'));
                }
                # End
            }
            $opUser->close();
        }
    }
}
?>
<!doctype html>
<html>
<head>
<?php 
include_once 'inc/inc_meta.php';
?>
</head>
Пример #9
0
                die(errMod(subscribers_incorrect_delimiter . "!", 'danger'));
            }
            $parsedList = '<ul id="sortable1" class="list-unstyled csvlist connectedSortable">';
            foreach ($data[0] as $k => $v) {
                $parsedList .= '<li><input type="hidden" class="csvkey" value="' . $k . '">' . ($v == '' ? '<span class="label label-danger">{' . subscribers_empty . '}</span>' : '<span class="label label-success">' . showIn($v, 'page') . '</span>') . '</li>';
            }
            $parsedList .= '</ul>';
            /* Parsing End */
            $handle->clean();
        } else {
            # Uploading Error
            $parsedList = errMod($handle->error, 'danger');
        }
        # Uploading Finished
    } else {
        $parsedList = errMod($handle->error, 'danger');
    }
    $csvAnalyst = '
	<style>
		  .ui-state-highlight { height: 1.5em; line-height: 1.2em; }
		  .connectedSortable{padding:5px; border:1px dashed #99CDFF}
		  .connectedSortable li{cursor:pointer;}
	</style>
	<div class="panel"><div class="panel-body">
						<div class="row">
							<div class="col-md-6">
								<h4>' . subscribers_csv_contents . '</h4><hr>
								' . $parsedList . '
							</div>
							<div class="col-md-6">
								<h4>' . subscribers_destination_table_columns . '</h4><hr>
Пример #10
0
            /* Update Data */
            if (!empty($codeVal)) {
                $upCode->bind_param('si', $codeVal, $codeID);
                $upCode->execute();
            }
            /* Delete Data */
            if (isset($_POST['del_' . $codeID]) && $_POST['del_' . $codeID] == 'YES') {
                $myconn->query("DELETE FROM " . db_table_pref . "short_codes WHERE OID=" . set_org_id . " AND ID=" . $codeID . " AND isSystem=0") or die(mysqli_error($myconn));
            }
        }
        $upCode->close();
    }
    if ($errText == '') {
        $errText = errMod(letheglobal_updated_successfully, 'success');
    } else {
        $errText = errMod($errText, 'danger');
    }
}
?>

<?php 
echo '<h1>' . $pg_title . '<span class="help-block"><span class="text-primary">' . organizations_short_codes . '</span></span></h1><hr>' . $pg_nav_buts . $errText;
?>

<form method="POST" action="">
	
	<div class="form-group">
		<?php 
echo '<div class="row">
				<div class="col-md-3"><div class="form-group"><label>' . letheglobal_limits . '</label><span class="clearfix"></span>' . getMyLimits($sourceLimit, set_org_max_shortcode) . '</div></div>
			   </div>';
Пример #11
0
                        die(errMod('' . letheglobal_updated . ': <strong>' . cntData("SELECT ID FROM " . db_table_pref . "subscribers WHERE " . $grps . "") . '</strong> ' . letheglobal_record . '', 'success'));
                    } else {
                        if ($acts == 'tosingleverified') {
                            $myconn->query("UPDATE " . db_table_pref . "subscribers SET subscriber_verify=1 WHERE " . $grps . "");
                            die(errMod('' . letheglobal_updated . ': <strong>' . cntData("SELECT ID FROM " . db_table_pref . "subscribers WHERE " . $grps . "") . '</strong> ' . letheglobal_record . '', 'success'));
                        } else {
                            if ($acts == 'todoubleverified') {
                                $myconn->query("UPDATE " . db_table_pref . "subscribers SET subscriber_verify=2 WHERE " . $grps . "");
                                die(errMod('' . letheglobal_updated . ': <strong>' . cntData("SELECT ID FROM " . db_table_pref . "subscribers WHERE " . $grps . "") . '</strong> ' . letheglobal_record . '', 'success'));
                            }
                        }
                    }
                }
            }
        } else {
            die(errMod($errText, 'danger'));
        }
        die;
    }
    /* Load Groups for All Sections */
    $listGrps = array();
    $opGroups = $myconn->query("SELECT \n\t\t\t\t\t\t\t\t\t\tSG.*,\n\t\t\t\t\t\t\t\t\t\t(SELECT COUNT(ID) FROM " . db_table_pref . "subscribers WHERE GID=SG.ID) AS sbr_cnt\n\t\t\t\t\t\t\t\t  FROM \n\t\t\t\t\t\t\t\t\t\t" . db_table_pref . "subscriber_groups AS SG\n\t\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t\t\tOID=" . set_org_id . " \n\n\t\t\t\t\t\t\t\t\t\t" . (LETHE_AUTH_VIEW_TYPE ? ' AND UID=' . LETHE_AUTH_ID . '' : '') . "\n\t\t\t\t\t\t\t  ORDER BY\n\t\t\t\t\t\t\t\t\t\tgroup_name\n\t\t\t\t\t\t\t\t   ASC\n\t\t\t\t\t\t\t\t") or die(mysqli_error($myconn));
    while ($opGroupsRs = $opGroups->fetch_assoc()) {
        $listGrps[] = $opGroupsRs;
    }
    $opGroups->free();
    $bulks = '
	<h4 class="text-primary">' . subscribers_bulk_actions . '</h4><hr>
	<div id="updateResult"></div>
	<form name="actBulk" id="actBulk" action="" method="POST">
	<input type="hidden" name="RunAction" value="YES">
Пример #12
0
 public function editOrganization()
 {
     global $myconn;
     $private_key = $this->private_key;
     $opOrg = $myconn->prepare("SELECT * FROM " . db_table_pref . "organizations WHERE ID=?") or die(mysqli_error($myconn));
     $opOrg->bind_param('i', $this->OID);
     $opOrg->execute();
     $opOrg->store_result();
     if ($opOrg->num_rows == 0) {
         echo errMod('* ' . letheglobal_record_not_found . '', 'danger');
     } else {
         $sr = new Statement_Result($opOrg);
         $opOrg->fetch();
     }
     $this->errPrint = '';
     # Remove Organization
     if (!$sr->Get('isPrimary')) {
         if (isset($_POST['del']) && $_POST['del'] == 'YES') {
             # Remove Folder
             deleteAll(LETHE_RESOURCE . DIRECTORY_SEPARATOR . $sr->Get('orgTag'));
             # Remove Blacklist
             $myconn->query("DELETE FROM " . db_table_pref . "blacklist WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Autoresponder Actions
             $myconn->query("DELETE FROM " . db_table_pref . "campaign_ar WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Campaign Groups
             $myconn->query("DELETE FROM " . db_table_pref . "campaign_groups WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Campaigns
             $myconn->query("DELETE FROM " . db_table_pref . "campaigns WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Organization Settings
             $myconn->query("DELETE FROM " . db_table_pref . "organization_settings WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Organization
             $myconn->query("DELETE FROM " . db_table_pref . "organizations WHERE ID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Reports
             $myconn->query("DELETE FROM " . db_table_pref . "reports WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Short Codes
             $myconn->query("DELETE FROM " . db_table_pref . "short_codes WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Form Fields
             $myconn->query("DELETE FROM " . db_table_pref . "subscribe_form_fields WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Forms
             $myconn->query("DELETE FROM " . db_table_pref . "subscribe_forms WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Subscriber Groups
             $myconn->query("DELETE FROM " . db_table_pref . "subscriber_groups WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Subscribers
             $myconn->query("DELETE FROM " . db_table_pref . "subscribers WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Tasks
             $myconn->query("DELETE FROM " . db_table_pref . "tasks WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Templates
             $myconn->query("DELETE FROM " . db_table_pref . "templates WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Unsubscribes
             $myconn->query("DELETE FROM " . db_table_pref . "unsubscribes WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # User Permissions
             $myconn->query("DELETE FROM " . db_table_pref . "user_permissions WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Users
             $myconn->query("DELETE FROM " . db_table_pref . "users WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Remove Cron Tasks
             include_once LETHE_ADMIN . DIRECTORY_SEPARATOR . 'classes/class.chronos.php';
             $letChr = new Crontab();
             $opCron = $myconn->query("SELECT * FROM " . db_table_pref . "chronos WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             while ($opCronRs = $opCron->fetch_assoc()) {
                 $letChr->removeJob($opCronRs['cron_command']);
             }
             $opCron->free();
             # Remove Crons
             $myconn->query("DELETE FROM " . db_table_pref . "chronos WHERE OID=" . $this->OID . "") or die(mysqli_error($myconn));
             # Done!
             header('Location: ?p=organizations/organization');
             return false;
             die;
         }
     }
     if (!isset($_POST['org_name']) || empty($_POST['org_name'])) {
         $this->errPrint .= '* ' . organizations_please_enter_a_organization_name . '<br>';
     }
     if (LETHE_AUTH_MODE == 2 && PRO_MODE) {
         if (!isset($_POST['org_max_user']) || !is_numeric($_POST['org_max_user'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_user_limit . '<br>';
         }
         if (!isset($_POST['org_max_newsletter']) || !is_numeric($_POST['org_max_newsletter'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_newsletter_limit . '<br>';
         }
         if (!isset($_POST['org_max_autoresponder']) || !is_numeric($_POST['org_max_autoresponder'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_autoresponder_limit . '<br>';
         }
         if (!isset($_POST['org_max_subscriber']) || !is_numeric($_POST['org_max_subscriber'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_subscriber_limit . '<br>';
         }
         if (!isset($_POST['org_max_subscriber_group']) || !is_numeric($_POST['org_max_subscriber_group'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_subscriber_group_limit . '<br>';
         }
         if (!isset($_POST['org_max_subscribe_form']) || !is_numeric($_POST['org_max_subscribe_form'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_subscribe_form_limit . '<br>';
         }
         if (!isset($_POST['org_max_blacklist']) || !is_numeric($_POST['org_max_blacklist'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_black_list_limit . '<br>';
         }
         if (!isset($_POST['org_max_template']) || !is_numeric($_POST['org_max_template'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_maximum_template_limit . '<br>';
         }
         if (!isset($_POST['org_max_shortcode']) || !is_numeric($_POST['org_max_shortcode'])) {
             $this->errPrint .= '* ' . organizations_please_enter_maximum_short_code_limit . '<br>';
         }
         if (!isset($_POST['org_max_daily_limit']) || !is_numeric($_POST['org_max_daily_limit'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_daily_sending_limit . '<br>';
         }
         if (!isset($_POST['org_standby_organization']) || !is_numeric($_POST['org_standby_organization'])) {
             $this->errPrint .= '* ' . organizations_please_enter_a_standby_time_for_organizations . '<br>';
         }
     } else {
         $_POST['org_max_user'] = set_org_max_user;
         $_POST['org_max_newsletter'] = set_org_max_newsletter;
         $_POST['org_max_autoresponder'] = set_org_max_autoresponder;
         $_POST['org_max_subscriber'] = set_org_max_subscriber;
         $_POST['org_max_subscriber_group'] = set_org_max_subscriber_group;
         $_POST['org_max_subscribe_form'] = set_org_max_subscribe_form;
         $_POST['org_max_blacklist'] = set_org_max_blacklist;
         $_POST['org_max_template'] = set_org_max_template;
         $_POST['org_max_shortcode'] = set_org_max_shortcode;
         $_POST['org_max_daily_limit'] = set_org_max_daily_limit;
         $_POST['org_standby_organization'] = set_org_standby_organization;
     }
     /* Only For Super Admin */
     if (LETHE_AUTH_MODE == 2) {
         if (!isset($_POST['org_submission_account']) || count($_POST['org_submission_account']) == 0) {
             $this->errPrint .= '* ' . organizations_please_choose_a_submission_account . '<br>';
         } else {
             $_POST['org_submission_account'] = implode(',', $_POST['org_submission_account']);
         }
     } else {
         $_POST['org_submission_account'] = set_org_submission_account;
     }
     if (!isset($_POST['org_sender_title']) || empty($_POST['org_sender_title'])) {
         $this->errPrint .= '* ' . organizations_please_enter_a_sender_title . '<br>';
     }
     if (!isset($_POST['org_reply_mail']) || !mailVal($_POST['org_reply_mail'])) {
         $this->errPrint .= '* ' . organizations_invalid_reply_mail . '<br>';
     }
     if (!isset($_POST['org_test_mail']) || !mailVal($_POST['org_test_mail'])) {
         $this->errPrint .= '* ' . organizations_invalid_test_mail . '<br>';
     }
     if (!isset($_POST['org_timezone']) || empty($_POST['org_timezone'])) {
         $this->errPrint .= '* ' . organizations_please_choose_a_timezone . '<br>';
     }
     if (!isset($_POST['org_after_unsubscribe']) || !is_numeric($_POST['org_after_unsubscribe'])) {
         $this->errPrint .= '* ' . organizations_please_choose_a_unsubscribe_action . '<br>';
     }
     if (!isset($_POST['org_verification']) || !is_numeric($_POST['org_verification'])) {
         $this->errPrint .= '* ' . organizations_please_choose_a_verification_method . '<br>';
     }
     if (!isset($_POST['org_random_load']) || empty($_POST['org_random_load'])) {
         $_POST['org_random_load'] = '';
     } else {
         $_POST['org_random_load'] = 1;
     }
     if (!isset($_POST['org_load_type']) || !is_numeric($_POST['org_load_type'])) {
         $this->errPrint .= '* ' . organizations_please_choose_a_load_type . '<br>';
     }
     if ($this->errPrint == '') {
         /* Common Values */
         $this->isPrimary = $sr->Get('isPrimary');
         $billingDate = $this->billingDate == 0 ? '' : $this->billingDate;
         $orgTag = $this->orgTag == '' ? $sr->Get('orgTag') : $this->orgTag;
         $public_key = $this->public_key == '' ? $sr->Get('public_key') : $this->public_key;
         $private_key = $this->private_key == '' ? $sr->Get('private_key') : $this->private_key;
         # RSS Url
         if (!isset($_POST['org_rss_url']) || empty($_POST['org_rss_url'])) {
             # Define as system URL
             $_POST['org_rss_url'] = lethe_root_url . 'lethe.newsletter.php?pos=rss&oid=' . $public_key;
         } else {
             $_POST['org_rss_url'] = $_POST['org_rss_url'];
         }
         $addOrg = $myconn->prepare("UPDATE \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . db_table_pref . "organizations\n\t\t\t\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\t\t\t\t\torgTag=?,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\torgName=?,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbillingDate=?,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive=1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic_key=?,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprivate_key=?,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trss_url=?\n\t\t\t\t\t\t\t\t\t\t\t  WHERE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tID=" . $sr->Get('ID') . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t") or die(mysqli_error($myconn));
         $addOrg->bind_param('ssssss', $orgTag, $_POST['org_name'], $billingDate, $public_key, $private_key, $_POST['org_rss_url']);
         $addOrg->execute();
         $addOrg->close();
         /* Organization ID */
         $orgID = $sr->Get('ID');
         /* Load Settings */
         global $LETHE_ORG_SET_VALS;
         $addSet = $myconn->prepare("UPDATE " . db_table_pref . "organization_settings SET set_val=? WHERE OID=? AND set_key=?") or die(mysqli_error($myconn));
         foreach ($LETHE_ORG_SET_VALS as $k => $v) {
             if (!isset($_POST[$v])) {
                 $_POST[$v] = constant('set_' . $v);
             }
             $addSet->bind_param('sis', $_POST[$v], $orgID, $v);
             $addSet->execute();
         }
         $addSet->close();
         unset($_POST);
         $this->isSuccess = 1;
         $this->errPrint = errMod('' . letheglobal_updated_successfully . '!', 'success');
     } else {
         $this->errPrint = errMod($this->errPrint, 'danger');
     }
 }
Пример #13
0
					});
					
					
				});
			</script>
		</div>
		<?php 
            }
            ?>
	  </div>

	</div>
	
<?php 
            if ($fm != 0 && $page_sub2 == 'edit') {
                echo errMod('Invalid Request!', 'danger');
            } else {
                ?>
<script>
	$(document).ready(function(){
		
		/* Draft Maker */
		$(".draftMaker").click(function(){
			var draftMod = $(this).data('draft-mod');
			$.ajax({
			url: 'modules/lethe.subscribers/act.xmlhttp.php?pos=createdraft&draftPos='+draftMod,
			success: function(data){
					$(".draftMod"+draftMod).html(data);
				}
			});
			
Пример #14
0
    ?>
</span><label for="remSrc"><?php 
    echo subscribers_remove_sources_after_merging;
    ?>
</label>
					<input type="checkbox" class="ionc" id="remSrc" name="remSrc" value="YES">
				</div>
				<div class="form-group">
					<button type="submit" name="mergeGroups" id="mergeGroups" class="btn btn-primary"><span class="glyphicon glyphicon-link"></span> <?php 
    echo subscribers_merge;
    ?>
</button>
				</div>
			<?php 
} else {
    echo errMod(subscribers_two_or_more_groups_required, 'danger');
}
?>

			</form>
      </div>
    </div>
  </div>
  
<form method="POST" action="">
<?php 
if (limitBlock($sourceLimit, set_org_max_subscriber_group)) {
    ?>
  <div class="panel panel-warning">
    <div class="panel-heading" role="tab" id="headingThree">
      <h4 class="panel-title">
Пример #15
0
# +------------------------------------------------------------------------+
# | Artlantis CMS Solutions                                                |
# +------------------------------------------------------------------------+
# | Lethe Newsletter & Mailing System                                      |
# | Copyright (c) Artlantis Design Studio 2014. All rights reserved.       |
# | Version       2.0                                                      |
# | Last modified 01.01.2015                                               |
# | Email         developer@artlantis.net                                  |
# | Web           http://www.artlantis.net                                 |
# +------------------------------------------------------------------------+
if (!isset($pgnt)) {
    die('You are not authorized to view this page!');
}
/* Demo Check */
if (!isDemo('saveSets')) {
    $errText = errMod(letheglobal_demo_mode_active, 'danger');
}
/* Save Settings */
if (isset($_POST['saveSets'])) {
    $letheSets = new lethe();
    $letheSets->letheSettings();
    $errText = $letheSets->errPrint;
}
echo $errText;
?>

<form name="genSets" id="genSets" action="" method="POST">
<div role="tabpanel">

  <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
Пример #16
0
<?php

# +------------------------------------------------------------------------+
# | Artlantis CMS Solutions                                                |
# +------------------------------------------------------------------------+
# | Lethe Newsletter & Mailing System                                      |
# | Copyright (c) Artlantis Design Studio 2014. All rights reserved.       |
# | Version       2.0                                                      |
# | Last modified 13.11.2014                                               |
# | Email         developer@artlantis.net                                  |
# | Web           http://www.artlantis.net                                 |
# +------------------------------------------------------------------------+
$pgnt = true;
if (LETHE_AUTH_MODE != 2) {
    echo errMod(letheglobal_you_are_not_authorized_to_view_this_page, 'danger');
} else {
    /* Languages */
    $sirius->langFiles[] = "settings_back.php";
    $sirius->loadLanguages();
    /* Mod Settings */
    $pg_title = letheglobal_general_settings;
    $pg_nav_buts = '';
    $errText = '';
    if ($page_sub == 'users') {
        $pg_nav_buts = '<div class="nav-buts">
					<a href="?p=settings/users/add" class="btn btn-success">' . letheglobal_add . '</a>
					<a href="?p=settings/users" class="btn btn-primary">' . letheglobal_list . '</a>
					</div>
					';
        /* USERS START */
        include_once 'manage/lethe.users.php';
Пример #17
0
            $opOrRs = $opOr->fetch_assoc();
            $usrLethe = new lethe();
            $usrLethe->onInstall = true;
            $usrLethe->isMaster = 1;
            $usrLethe->auth_mode = 2;
            $usrLethe->isPrimary = 1;
            $usrLethe->OID = $opOrRs['ID'];
            $usrLethe->addUser();
        }
        # Main Cron
        $letChr = new Crontab();
        $mainCroner = "* * * * * curl -s '" . lethe_root_url . "chronos/lethe.php' >/dev/null 2>&1";
        $letChr->addJob($mainCroner);
        die('<script>$("#myLethe").attr("disabled",true);</script>' . errMod('Lethe Successfully Installed on Your System!<br>Dont Forget to Remove <strong>install.php</strong> File!', 'success'));
    } else {
        die('<script>$("#myLethe").attr("disabled",false);</script>' . errMod($errors, 'danger'));
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Lethe Newsletter &amp; Mailing System Installation</title>

<!-- styles -->
<link rel="stylesheet" href="admin/bootstrap/dist/css/bootstrap.min.css">
<link href="admin/css/ionCheck/ion.checkRadio.css" rel="stylesheet" type="text/css">
<link href="admin/css/ionCheck/ion.checkRadio.cloudy.css" rel="stylesheet" type="text/css">
Пример #18
0
        if ($tempList['errno'] != 0) {
            echo '<div class="col-md-12">' . errMod(templates_templates_could_not_be_loaded, 'danger') . '</div>';
        } else {
            $tempRes = json_decode($tempList['content'], true);
            if ($tempRes['err'] != '') {
                if ($tempRes['err'] == 'INVALID_LICENSE') {
                    echo '<div class="col-md-12">' . errMod(letheglobal_invalid_license_key, 'danger') . '</div>';
                } else {
                    if ($tempRes['err'] == 'NO_RECORD') {
                        echo '<div class="col-md-12">' . errMod(templates_there_no_found_template, 'danger') . '</div>';
                    }
                }
            } else {
                $temps = '';
                if (!is_array($tempRes['cont'])) {
                    $temps .= '<div class="col-md-12">' . errMod(templates_template_server_is_temporarily_down, 'danger') . '</div>';
                } else {
                    foreach ($tempRes['cont'] as $k => $v) {
                        $controller = cntData("SELECT ID FROM " . db_table_pref . "templates WHERE OID=" . set_org_id . " AND temp_id='" . mysql_prep($v['temp_id']) . "'");
                        $temps .= '
		  <div class="col-sm-5 col-md-3">
			<div class="thumbnail">
			  <a href="modules/lethe.templates/act.xmlhttp.php?pos=tempdown&tempID=' . $v['down_link'] . '&prevs=1" data-fancybox-type="iframe" class="fancybox tempPrevs effect6"><span><img src="' . ($v['image'] == '' ? 'images/temp/tempHolder.png' : showIn($v['image'], 'input')) . '" alt=""></span></a>
			  <div class="caption">
				<a href="modules/lethe.templates/act.xmlhttp.php?pos=tempdown&tempID=' . $v['down_link'] . '&prevs=1" data-fancybox-type="iframe" class="fancybox">' . $v['name'] . '</a>
				<p><small>' . setMyDate($v['add_date'], 2) . '</small></p>
				<p>';
                        if ($controller == 0) {
                            if ($v['isPremium']) {
                                $temps .= '<span class="t' . $v['ID'] . '"><a href="http://www.newslether.com/buyTemplate.php?id=' . $v['premiumKey'] . '" target="_blank" id="t' . $v['ID'] . '" class="text-danger tooltips buyNow" title="' . templates_buy_now . '"><span class="glyphicon glyphicon-shopping-cart"></span></a></span> <span class="text-primary">' . number_format($v['price'], 2) . '$</span><span class="premiumTemp label label-info"><span class="glyphicon glyphicon-star"></span> Premium</span>';
                            } else {