本文整理汇总了PHP中IEM::sessionID方法的典型用法代码示例。如果您正苦于以下问题:PHP IEM::sessionID方法的具体用法?PHP IEM::sessionID怎么用?PHP IEM::sessionID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEM
的用法示例。
在下文中一共展示了IEM::sessionID方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DisplayChart
/**
* DisplayChart
* Sets the URL for chart data and sets the variables to display the chart
*
* @param String $chartname The variable name for the chart
* @param String $chart_area The statistics area the chart is for
* @param Int $statid The statid the chart is for
* @param String $type The type of chart to display
* @param Array $settings Settings for the chart
*
* @see InsertChartImage
*
* @return Void Returns nothing
*/
function DisplayChart($chartname='', $chart_area='', $statid=0, $type = 'pie', $settings = null)
{
$data_url = 'stats_chart.php?graph=' . urlencode(strtolower($chartname)) . '&Area='.urlencode(strtolower($chart_area)) . '&statid=' . (int)$statid . '&' . IEM::SESSION_NAME . '=' . IEM::sessionID();
$this->InsertChartImage($chartname,$data_url);
}
示例2: ManageImages
/**
* ManageImages
* Perform the action to display the UI for managing Images.
*
* @param Interger $userid The user id of current login user.
*
* @return Void Doesn't return anything. Display the template to the browser.
*/
function ManageImages () {
$api = $this->GetApi();
$settingApi = $this->GetApi('settings');
$GLOBALS['adminUrl'] = SENDSTUDIO_APPLICATION_URL.'/admin';
$GLOBALS['imgLocation'] = $api->GetImageDir();
$params = '';
foreach ($_GET as $k=>$v) {
$params[] = $k.'='.$v;
}
if ($params) {
$params = '?'.implode('&', $params);
}
$tpl = GetTemplateSystem();
$tpl->Assign('SessionName', IEM::SESSION_NAME);
$tpl->Assign('SessionID', IEM::sessionID());
$tpl->Assign('Params', $params);
echo $tpl->ParseTemplate('Image_Manage');
die();
}
示例3: Process
//.........这里部分代码省略.........
$return['successimages'] = $successImages;
if(count($successImages) == 1){
$return['message'] = GetLang('ImageManagerDeleteSuccessSingle');
}elseif(count($successImages) > 1){
$return['message'] = sprintf(GetLang('ImageManagerDeleteSuccessMulti'), count($successImages));
}
echo json_encode($return);
die();
break;
case 'imagemanagerimagenumshown':
$api = $this->GetApi('ImageManager');
$api->Init();
$return['text'] = $api->GetImageNumberShownText();
echo json_encode($return);
break;
case 'imagemanagermanage':
$api = $this->GetApi('ImageManager');
$settingApi = $this->GetApi('settings');
$GLOBALS['imgLocation'] = $api->GetImageDir();
// Sorting of the images
$validSort = array("name.asc", "name.desc", "modified.desc", "modified.asc", "size.asc", "size.desc");
$sortby = '';
if(isset($_GET['SortBy'])){
$sortby = $_GET['SortBy'];
$sortBits = explode('.', $sortby);
$_GET['SortBy'] = $sortBits[0];
$_GET['Direction'] = $sortBits[1];
}
$perpage = $this->GetPerPage();
$DisplayPage = $this->GetCurrentPage();
$start = 0;
$sortinfo = $this->GetSortDetails();
// if sorting field and direction is defined
if (isset($sortinfo['Direction']) && isset($sortinfo['SortBy'])) {
$sortby = $sortinfo['SortBy'].'.'.$sortinfo['Direction'];
}
// Default sorting field and direction
if(empty($sortby) || !in_array($sortby, $validSort, true)){
$sortby = 'name.asc';
list($sortinfo['SortBy'], $sortinfo['Direction']) = explode('.', $sortby);
}
// Init the images sorting field and direction
$api->Init($sortinfo['Direction'], $sortinfo['SortBy']);
// Pagination setup
$GLOBALS['SortList'] = '';
foreach ($validSort as $eachSort) {
$eachSortBits = explode('.', $eachSort);
$displayText = GetLang('Sort'.ucwords($eachSortBits[0]).ucwords($eachSortBits[1]));
$sel = '';
if ($eachSort == $sortby) {
$sel = ' SELECTED ';
}
$GLOBALS['SortList'] .= '<option value="'.$eachSort.'" '.$sel.'>' . $displayText . '</option> ';
}
if (strtolower($perpage) != 'all') {
$api->start = ($perpage * $DisplayPage) - $perpage;
$api->finish = ($perpage * $DisplayPage);
}
$NumberOfImages = ($api->CountDirItems())?$api->CountDirItems():1;
$this->SetupPaging($NumberOfImages, $DisplayPage, $perpage);
$GLOBALS['FormAction'] = 'Action=ProcessPaging';
$paging = $this->ParseTemplate('Paging', true);
$GLOBALS['dirImages'] = '';
$dirImages = $api->GetImageDirFiles();
$GLOBALS['Intro_Help'] = GetLang('Help_ImageManagerManage');
$GLOBALS['Intro'] = GetLang('ImageManagerManage');
$GLOBALS['NumImageShown'] = $api->GetImageNumberShownText();
$GLOBALS['ImageManager_AddButton'] = '<input id="btnUpload" type="button" value="'.GetLang('ImageManagerUploadImages').'" class="SmallButton" />';
$showDeleteBtn = "display:none";
if ($api->CountDirItems()) {
$showDeleteBtn = "";
foreach ($dirImages as $dirImage) {
$GLOBALS['dirImages'] .= "AdminImageManager.AddImage( '".addslashes($dirImage['name'])."', '".addslashes($dirImage['url'])."', '".$dirImage['size']." Bytes', '".$dirImage['width']."', '".$dirImage['height']."', '".$dirImage['origwidth']." X ".$dirImage['origheight']."', '".$dirImage['id']."'); "; $GLOBALS['DisplayImagePanel'] = 'block';
}
} else {
$GLOBALS['DisplayImagePanel'] = 'none';
$GLOBALS['Message'] = $GLOBALS['Message'] = $this->PrintSuccess('NoImage');
}
$GLOBALS['ImageManager_DeleteButton'] = '<input id="deleteButton" type="button" value="'.GetLang('DeleteSelected').'" class="SmallButton" style="'.$showDeleteBtn.';" />';
$tpl = GetTemplateSystem();
$tpl->Assign('SessionName', IEM::SESSION_NAME);
$tpl->Assign('Pagination', $paging);
$tpl->Assign('SessionID', IEM::sessionID());
echo $tpl->ParseTemplate('Image_Manager_Sub');
break;
}
}
}
示例4: PrintNewsletterStatsChart
function PrintNewsletterStatsChart($statid=0)
{
$statsapi = $this->GetApi('Stats');
include(dirname(__FILE__) . '/amcharts/amcharts.php');
$perpage = 1;
$summary = $statsapi->GetNewsletterSummary($statid, true, $perpage);
$sent_size = $summary['sendsize'];
$total_bounces = $summary['bouncecount_unknown'] + $summary['bouncecount_hard'] + $summary['bouncecount_soft'];
// now for the opens page.
// by default this is for all opens, not unique opens.
$only_unique = false;
if (isset($_GET['Unique'])) {
$only_unique = true;
}
$unopened = $sent_size - $summary['emailopens_unique'] - $total_bounces;
if ($unopened < 0) {
$unopened = 0;
}
$data_url = 'stats_chart.php?Opens='. $summary['emailopens_unique'] . '&Unopened=' . $unopened . '&Bounced=' . $total_bounces . '&' . IEM::SESSION_NAME . '=' . IEM::sessionID();
// Newsletter Summary Chart
$chart = InsertChart('pie', $data_url, array('graph_title' => GetLang("NewsletterSummaryChart"), 'y_position' => '150', 'x_position' => '300', 'legend_x_position' => '0', 'legend_y_position' => '230', 'title_align' => 'left'));
echo $chart;
}
示例5: TriggerEmailsStats_View
//.........这里部分代码省略.........
// Set up session information that correspond to the current stats (this information in the session will not be cleaned up, need to refactor)
// The session infromation is used to print out a table that list email addressess for "open" and "link" tabs
IEM::sessionSet($page['session_token'], array(
'statid' => $record['statid'],
'calendar_restrictions' => $this->CalendarRestrictions,
'unique_open_only' => $page['unique_open'],
'summary' => $record
));
}
// -----
// Load additional language variable for displaying trigger email statistics
$this->LoadLanguageFile('TriggerEmails');
// Include the charting tool
include_once (SENDSTUDIO_FUNCTION_DIRECTORY . '/amcharts/amcharts.php');
// ----- Tab 1: Snapshot
$tabs['snapshot']['intro'] = sprintf(GetLang('TriggerEmails_Stats_Snapshots_Intro'), $record['triggeremailsname']);
$tabs['snapshot']['newsletter_uniqueopen'] = sprintf(GetLang('EmailOpens_Unique'), $this->FormatNumber($record['emailopens_unique']));
$tabs['snapshot']['newsletter_totalopen'] = sprintf(GetLang('EmailOpens_Total'), $this->FormatNumber($record['emailopens']));
$tabs['snapshot']['newsletter_bounce'] = $this->FormatNumber($record['processed_totalbounced']);
$tabs['snapshot']['url_open_url'] = 'index.php?Page=Stats&Action=TriggerEmails&SubAction=view&tab=2&id=' . $id;
$tabs['snapshot']['url_openunique_url'] = $tabs['snapshot']['url_open_url'] . '&Unique=1';
$tabs['snapshot']['summary_chart'] = InsertChart(
'pie',
'stats_chart.php?Opens=' . $record['emailopens_unique'] . '&Unopened=' . $record['processed_unopened'] . '&Bounced=' . $record['processed_totalbounced'] . '&Area=TriggerEmails&'. IEM::SESSION_NAME . '=' . IEM::sessionID(),
array('graph_title' => sprintf(GetLang('TriggerEmails_Stats_Snapshots_ChartTitle'), $record['triggeremailsname'])));
// -----
// ----- Tab 2: Open rates
$tabs['open']['intro'] = sprintf(GetLang('TriggerEmails_Stats_Open_Intro'), $record['triggeremailsname']);
// setup calendar
$GLOBALS['TabID'] = '1';
$this->SetupCalendar('Action=ProcessCalendar&SubAction=TriggerEmails&NextAction=View&tab=2&id=' . $id);
$tabs['open']['calendar'] = $GLOBALS['Calendar'];
unset($GLOBALS['TabID']);
unset($GLOBALS['Calendar']);
// Set up error message if no "opens" count is not available
if (!array_key_exists('processed_timeframe_emailopens_total', $record) || !$record['processed_timeframe_emailopens_total']) {
$tempMessage = 'TriggerEmails_Stats_Open_Error_HasNotBeenOpened';
$tempRestriction = $this->CalendarRestrictions;
if ($triggerrecord['triggeractions']['send']['trackopens'] == 0) {
$tempMessage = 'TriggerEmails_Stats_Open_Error_NotOpenTracked';
} elseif (array_key_exists('opens', $tempRestriction) && !empty($tempRestriction['opens'])) {
$tempMessage = 'TriggerEmails_Stats_Open_Error_HasNotBeenOpened_CalendarProblem';
}
$GLOBALS['Error'] = GetLang($tempMessage);
$tabs['open']['message'] = $this->ParseTemplate('ErrorMsg', true, false);
unset($GLOBALS['Error']);
// Set up open information otherwise
} else {
示例6: generateCharts
/**
* generateCharts
* Generates charts for summary, open, click, bounce and unsubscribe stats.
*
* @param String $splitname The name of the split test.
* @param String $campaigns Campaign data for the split test.
* @param String $subaction Can be 'print' to insert images instead of flash charts.
*
* @return Array The chart data to output.
*/
protected function generateCharts($splitname, $campaigns, $subaction = null)
{
require_once SENDSTUDIO_BASE_DIRECTORY . '/functions/amcharts/amcharts.php';
$stats_api = $this->GetApi('Splittest_Stats');
$statsChartUrl = SENDSTUDIO_APPLICATION_URL . '/admin/stats_chart.php?graph=custom_bar&' . IEM::SESSION_NAME . '=' . IEM::sessionID() . '&';
$chartType = 'column';
$summaryDataURL = $statsChartUrl . $stats_api->barChartSummaryDataURL($campaigns, 'Opens,Clicks,Bounces,Unsubscribes');
$charts = array();
$charts['summary_chart'] = self::InsertChartImage('SplittestSummaryChart', $summaryDataURL, array('graph_title' => sprintf(GetLang('Addon_splittest_Stats_Summary'), $splitname)), $subaction);
// Splittest Sumamry Open Rate Chart
$openrateDataURL = $statsChartUrl . $stats_api->barChartDataURL($campaigns, 'emailopens_unique', true, true, true);
$charts['openrate_chart'] = self::InsertChartImage('SplittestOpenChart', $openrateDataURL, array('graph_title' => sprintf(GetLang('Addon_splittest_Stats_Total_UniqueOpens'), $splitname)), $subaction);
// Splittest Sumamry Link Clicks Chart
$linkclicksDataURL = $statsChartUrl . $stats_api->barChartDataURL($campaigns, 'linkclicks', true, true, true);
$charts['clickrate_chart'] = self::InsertChartImage('SplittestLinkChart', $linkclicksDataURL, array('graph_title' => sprintf(GetLang('Addon_splittest_Stats_Total_LinkClicks'), $splitname)), $subaction);
// Splittest Bounce Count Chart
$bounceDataURL = $statsChartUrl . $stats_api->barChartDataURL($campaigns, 'bouncecount_total', true, true);
$charts['bouncerate_chart'] = self::InsertChartImage('SplittestBounceChart', $bounceDataURL, array('graph_title' => sprintf(GetLang('Addon_splittest_Stats_Total_Bounces'), $splitname)), $subaction);
// Splittest Unsubscribe Count Chart
$unsubscribeDataURL = $statsChartUrl . $stats_api->barChartDataURL($campaigns, 'unsubscribecount', true, true);
$charts['unsubscribes_chart'] = self::InsertChartImage('SplittestUnsubscribeChart', $unsubscribeDataURL, array('graph_title' => sprintf(GetLang('Addon_splittest_Stats_Total_Unsubscribes'), $splitname)), $subaction);
return $charts;
}