本文整理汇总了PHP中get_app_info函数的典型用法代码示例。如果您正苦于以下问题:PHP get_app_info函数的具体用法?PHP get_app_info怎么用?PHP get_app_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_app_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_saved_data
function get_saved_data($val)
{
global $mysqli;
$q = 'SELECT ' . $val . ' FROM campaigns WHERE id = "' . mysqli_real_escape_string($mysqli, $_GET['c']) . '" AND userID = ' . get_app_info('main_userID');
$r = mysqli_query($mysqli, $q);
if ($r && mysqli_num_rows($r) > 0) {
while ($row = mysqli_fetch_array($r)) {
$value = stripslashes($row[$val]);
//if title
if ($val == 'title') {
//tags for subject
preg_match_all('/\\[([a-zA-Z0-9!#%^&*()+=$@._-|\\/?<>~`"\'\\s]+),\\s*fallback=/i', $value, $matches_var, PREG_PATTERN_ORDER);
preg_match_all('/,\\s*fallback=([a-zA-Z0-9!,#%^&*()+=$@._-|\\/?<>~`"\'\\s]*)\\]/i', $value, $matches_val, PREG_PATTERN_ORDER);
preg_match_all('/(\\[[a-zA-Z0-9!#%^&*()+=$@._-|\\/?<>~`"\'\\s]+,\\s*fallback=[a-zA-Z0-9!,#%^&*()+=$@._-|\\/?<>~`"\'\\s]*\\])/i', $value, $matches_all, PREG_PATTERN_ORDER);
$matches_var = $matches_var[1];
$matches_val = $matches_val[1];
$matches_all = $matches_all[1];
for ($i = 0; $i < count($matches_var); $i++) {
$field = $matches_var[$i];
$fallback = $matches_val[$i];
$tag = $matches_all[$i];
//for each match, replace tag with fallback
$value = str_replace($tag, $fallback, $value);
}
$value = str_replace('[Email]', get_saved_data('from_email'), $value);
}
return $value;
}
}
}
示例2: pagination
function pagination($limit)
{
global $p;
$curpage = $p;
$next_page_num = 0;
$prev_page_num = 0;
$total_campaigns = totals($_GET['i']);
$total_pages = @ceil($total_campaigns / $limit);
if ($total_campaigns > $limit) {
if ($curpage >= 2) {
$next_page_num = $curpage + 1;
$prev_page_num = $curpage - 1;
} else {
$next_page_num = 2;
}
echo '<div class="btn-group" id="pagination">';
//Prev btn
if ($curpage >= 2) {
if ($prev_page_num == 1) {
echo '<button class="btn" onclick="window.location=\'' . get_app_info('path') . '/templates?i=' . get_app_info('app') . '\'"><span class="icon icon icon-arrow-left"></span></button>';
} else {
echo '<button class="btn" onclick="window.location=\'' . get_app_info('path') . '/templates?i=' . get_app_info('app') . '&p=' . $prev_page_num . '\'"><span class="icon icon icon-arrow-left"></span></button>';
}
} else {
echo '<button class="btn disabled"><span class="icon icon icon-arrow-left"></span></button>';
}
//Next btn
if ($curpage == $total_pages) {
echo '<button class="btn disabled"><span class="icon icon icon-arrow-right"></span></button>';
} else {
echo '<button class="btn" onclick="window.location=\'' . get_app_info('path') . '/templates?i=' . get_app_info('app') . '&p=' . $next_page_num . '\'"><span class="icon icon icon-arrow-right"></span></button>';
}
echo '</div>';
}
}
示例3: listsDisabledForUser
function listsDisabledForUser()
{
if (listsDisabledForBrand() && function_exists('get_app_info')) {
if (get_app_info('is_sub_user')) {
return 1;
} else {
return 0;
}
}
}
示例4: get_subscribers_count
function get_subscribers_count($lid)
{
global $mysqli;
//Check if the list has a pending CSV for importing via cron
$server_path_array = explode('list.php', $_SERVER['SCRIPT_FILENAME']);
$server_path = $server_path_array[0];
if (file_exists($server_path . 'uploads/csvs') && ($handle = opendir($server_path . 'uploads/csvs'))) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn') {
$file_array = explode('-', $file);
if (!empty($file_array)) {
if (str_replace('.csv', '', $file_array[1]) == $lid) {
return _('Checking..') . '
<script type="text/javascript">
$(document).ready(function() {
list_interval = setInterval(function(){get_list_count(' . $lid . ')}, 2000);
function get_list_count(lid)
{
clearInterval(list_interval);
$.post("includes/list/progress.php", { list_id: lid, user_id: ' . get_app_info('main_userID') . ' },
function(data) {
if(data)
{
if(data.indexOf("%)") != -1)
list_interval = setInterval(function(){get_list_count(' . $lid . ')}, 2000);
$("#progress' . $lid . '").html(data);
}
else
{
$("#progress' . $lid . '").html("' . _('Error retrieving count') . '");
}
}
);
}
});
</script>';
}
}
}
}
closedir($handle);
}
//if not, just return the subscriber count
$q = 'SELECT COUNT(*) FROM subscribers WHERE list = ' . $lid . ' AND unsubscribed = 0 AND bounced = 0 AND complaint = 0 AND confirmed = 1';
$r = mysqli_query($mysqli, $q);
if ($r) {
while ($row = mysqli_fetch_array($r)) {
return $row['COUNT(*)'];
}
}
}
示例5: get_app_data
function get_app_data($val)
{
global $mysqli;
$q = 'SELECT ' . $val . ' FROM apps WHERE id = "' . get_app_info('app') . '" AND userID = ' . get_app_info('main_userID');
$r = mysqli_query($mysqli, $q);
if ($r && mysqli_num_rows($r) > 0) {
while ($row = mysqli_fetch_array($r)) {
return $row[$val];
}
}
}
示例6: get_paypal
function get_paypal()
{
global $mysqli;
$q = 'SELECT paypal FROM login WHERE id = ' . get_app_info('main_userID');
$r = mysqli_query($mysqli, $q);
if ($r && mysqli_num_rows($r) > 0) {
while ($row = mysqli_fetch_array($r)) {
return $row['paypal'];
}
}
}
示例7: get_saved_data
function get_saved_data($val)
{
global $mysqli;
$q = 'SELECT ' . $val . ' FROM apps WHERE id = "' . mysqli_real_escape_string($mysqli, $_GET['i']) . '" AND userID = ' . get_app_info('userID');
$r = mysqli_query($mysqli, $q);
if ($r && mysqli_num_rows($r) > 0) {
while ($row = mysqli_fetch_array($r)) {
return $row[$val];
}
}
}
示例8: _
if(data)
{
$("#' . $id . '").fadeOut();
}
else
{
alert("' . _('Sorry, unable to delete. Please try again later!') . '");
}
}
);
}
});
</script>
</tr>';
}
} else {
echo '
<tr>
<td><a href="' . get_app_info('path') . '/new-brand" title="">' . _('Add your first brand!') . '</a></td>
<td></td>
<td></td>
</tr>
';
}
?>
</tbody>
</table>
</div>
</div>
<?php
include 'includes/footer.php';
示例9: get_app_info
<?php
if (get_app_info('version_latest') > get_app_info('version')) {
?>
<a href="http://sendy.co/get-updated?l=<?php
echo get_app_info('license');
?>
" target="_blank" style="text-decoration:none;"><span class="label label-info">new version: <?php
echo get_app_info('version_latest');
?>
available</span></a>
<?php
}
?>
</p>
<?php
} else {
?>
<p>© <?php
echo date("Y", time());
?>
<?php
echo get_app_info('company');
?>
</p>
<?php
}
?>
</footer>
</div>
</body>
</html>
示例10: get_app_info
<?php
include '../functions.php';
include '../login/auth.php';
/********************************/
$userID = get_app_info('main_userID');
$app = $_POST['app'];
$listID = mysqli_real_escape_string($mysqli, $_POST['list_id']);
$line = $_POST['line'];
/********************************/
//if user did not enter anything
if ($line == '') {
//show error msg
header("Location: " . get_app_info('path') . '/unsubscribe-from-list?i=' . $app . '&l=' . $listID . '&e=2');
exit;
}
$line_array = explode("\r\n", $line);
for ($i = 0; $i < count($line_array); $i++) {
$q = 'UPDATE subscribers SET unsubscribed = 1 WHERE email = "' . $line_array[$i] . '" AND list = ' . $listID . ' AND userID = ' . $userID;
$r = mysqli_query($mysqli, $q);
if ($r) {
}
}
header("Location: " . get_app_info('path') . '/subscribers?i=' . $app . '&l=' . $listID);
示例11: header
<?php
include_once 'includes/functions.php';
if (unlog_session()) {
header('Location: ' . get_app_info('path') . '/login');
}
示例12: _
?>
/settings"><?php
echo _('Settings');
?>
</a>.</div><br/>
<div class="well">
<h3><?php
echo _('Client login details');
?>
</h3><br/>
<p><strong><?php
echo _('Login URL');
?>
</strong>: <?php
echo get_app_info('path');
?>
</p>
<p><strong><?php
echo _('Login email');
?>
</strong>: <span id="login-email"><?php
echo _('Not set yet');
?>
(<?php
echo _('uses');
?>
<em><?php
echo _('From email');
?>
</em>)</span></p>
示例13: _
</a>
</div>
</div>
<script type="text/javascript">
$(".subscriber-info").click(function(){
s_id = $(this).data("id");
$("#subscriber-text").html("<?php
echo _('Fetching');
?>
..");
$.post("<?php
echo get_app_info('path');
?>
/includes/subscribers/subscriber-info.php", { id: s_id, app:<?php
echo get_app_info('app');
?>
},
function(data) {
if(data)
{
$("#subscriber-text").html(data);
}
else
{
$("#subscriber-text").html("<?php
echo _('Oops, there was an error getting the subscriber\'s info. Please try again later.');
?>
");
}
}
示例14: get_app_info
?>
"></i> All templates</a></li>
<li <?php
if (currentPage() == 'templates.php' && $_GET['do'] == "create") {
echo 'class="active"';
}
?>
><a href="<?php
echo get_app_info('path') . '/templates.php?i=' . $_GET['i'] . '&do=create';
?>
"><i class="icon-edit <?php
if (currentPage() == 'templates.php' && $_GET['do'] == "create") {
echo 'icon-white';
}
?>
"></i> Create template</a></li>
<li <?php
if (currentPage() == 'templates.php' && $_GET['do'] == "campaign") {
echo 'class="active"';
}
?>
><a href="<?php
echo get_app_info('path') . '/templates.php?i=' . $_GET['i'] . '&do=campaign';
?>
"><i class="icon-edit <?php
if (currentPage() == 'templates.php' && $_GET['do'] == "campaign") {
echo 'icon-white';
}
?>
"></i> New template campaign</a></li>
</ul>
示例15: mysqli_real_escape_string
<?php
include '../functions.php';
include '../login/auth.php';
$subscriber_id = mysqli_real_escape_string($mysqli, $_POST['subscriber_id']);
$q = 'DELETE FROM subscribers WHERE id = ' . $subscriber_id . ' AND userID = ' . get_app_info('main_userID');
$r = mysqli_query($mysqli, $q);
if ($r) {
echo true;
}