当前位置: 首页>>代码示例>>PHP>>正文


PHP WebblerListing::addElement方法代码示例

本文整理汇总了PHP中WebblerListing::addElement方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::addElement方法的具体用法?PHP WebblerListing::addElement怎么用?PHP WebblerListing::addElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebblerListing的用法示例。


在下文中一共展示了WebblerListing::addElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have clicked a link in the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->fetchMessageClicks($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['email'];
         if ($key) {
             $w->addElement($key, new CommonPlugin_PageURL('userhistory', array('id' => $row['userid'])));
             foreach ($this->model->selectedAttrs as $attr) {
                 $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
             }
             $w->addColumn($key, $this->i18n->get('links clicked'), $row['links'], new CommonPlugin_PageURL('userclicks', array('userid' => $row['userid'], 'msgid' => $this->model->msgid)), 'left');
         } else {
             $key = $this->i18n->get('user_not_exist');
             $w->addElement($key, '');
             $w->addColumn($key, $this->i18n->get('links clicked'), $row['links']);
         }
         $w->addColumn($key, $this->i18n->get('clicks_total'), $row['clicks']);
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:23,代码来源:Clicked.php

示例2: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with domains
      */
     $w->setTitle($this->i18n->get('Domain'));
     $resultSet = $this->model->messageByDomain($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['domain'];
         $w->addElement($key, null);
         $w->addColumn($key, $this->i18n->get('sent'), $row['sent']);
         $w->addColumn($key, $this->i18n->get('opened'), $row['opened']);
         $w->addColumn($key, $this->i18n->get('clicked'), $row['clicked']);
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:15,代码来源:Domain.php

示例3: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have not opened the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultIterator = $this->model->fetchMessageOpens($this->isOpened, $start, $limit);
     foreach ($resultIterator as $row) {
         $key = $row['email'];
         $w->addElement($key, new CommonPlugin_PageURL('user', array('id' => $row['userid'])));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:15,代码来源:Unopened.php

示例4: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have forwarded the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->fetchMessageForwards($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['email'];
         $w->addElement($key, new CommonPlugin_PageURL('userhistory', array('id' => $row['id'])));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
         $w->addColumn($key, $this->i18n->get('count'), $row['count'], null, 'left');
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:16,代码来源:Forwarded.php

示例5: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who bounced
      */
     $w->setTitle($this->i18n->get('Bounce ID'));
     $resultIterator = $this->model->fetchMessageBounces($start, $limit);
     foreach ($resultIterator as $row) {
         $key = $row['bounce'];
         $w->addElement($key, new CommonPlugin_PageURL('bounce', array('s' => 0, 'id' => $row['bounce'])));
         $w->addColumn($key, 'email', $row['email'], new CommonPlugin_PageURL('userhistory', array('id' => $row['user']), 'left'));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:16,代码来源:Bounced.php

示例6: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with list details
      */
     $w->setTitle($this->i18n->get('Lists'));
     $resultIterator = $this->model->fetchLists($start, $limit);
     $rows = iterator_to_array($resultIterator);
     if (!($start == 0 && $limit == 1)) {
         $rows[] = array('id' => '', 'name' => $this->i18n->get('All lists'), 'description' => '', 'active' => '', 'count' => '');
     }
     foreach ($rows as $row) {
         $key = "{$row['id']} | {$row['name']}";
         $latest = $this->model->latestMessage($row['id']);
         $w->addElement($key, $latest ? new CommonPlugin_PageURL(null, array('type' => 'messages', 'listid' => $row['id'])) : '');
         $w->addColumn($key, $this->i18n->get('active'), $row['active']);
         $w->addColumn($key, $this->i18n->get('total sent'), $row['count']);
         $w->addColumn($key, $this->i18n->get('latest'), $latest, $latest ? new CommonPlugin_PageURL(null, array('type' => 'opened', 'listid' => $row['id'], 'msgid' => $latest)) : '');
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:20,代码来源:Lists.php

示例7: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with link details
      */
     $w->setTitle($this->i18n->get('Link URL'));
     $resultSet = $this->model->links($start, $limit);
     $query = array('listid' => $this->model->listid, 'msgid' => $this->model->msgid, 'type' => 'linkclicks');
     foreach ($resultSet as $row) {
         $key = preg_replace('%^(http|https)://%i', '', $row['url']);
         if (strlen($key) > 39) {
             $key = htmlspecialchars(substr($key, 0, 22)) . ' ... ' . htmlspecialchars(substr($key, -12));
         }
         $key = sprintf('<span title="%s">%s</span>', htmlspecialchars($row['url']), $key);
         $query['forwardid'] = $row['forwardid'];
         $w->addElement($key, new CommonPlugin_PageURL(null, $query));
         $w->addColumnHtml($key, $this->i18n->get('pers.'), $row['personalise'] ? new CommonPlugin_ImageTag('user.png', 'URL is personalised') : '');
         $w->addColumn($key, $this->i18n->get('clicks'), $row['numclicks']);
         $w->addColumn($key, $this->i18n->get('users'), $row['usersclicked'] > 0 ? sprintf('%d (%0.2f%%)', $row['usersclicked'], $row['usersclicked'] / $row['totalsent'] * 100) : '');
         $w->addColumn($key, $this->i18n->get('firstclick'), $row['firstclick']);
         $w->addColumn($key, $this->i18n->get('latestclick'), $row['numclicks'] > 1 ? $row['latestclick'] : '');
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:23,代码来源:Links.php

示例8: while

## messages table
if ($total) {
    $result = Sql_query('SELECT * FROM ' . $tables['message'] . " {$whereClause} {$sortBySql} limit {$limit} offset {$offset}");
    while ($msg = Sql_fetch_array($result)) {
        $editlink = '';
        $messagedata = loadMessageData($msg['id']);
        if ($messagedata['subject'] != $messagedata['campaigntitle']) {
            $listingelement = '<!--' . $msg['id'] . '-->' . stripslashes($messagedata['campaigntitle']) . '<br/><strong>' . stripslashes($messagedata['subject']) . '</strong>';
        } else {
            $listingelement = '<!--' . $msg['id'] . '-->' . stripslashes($messagedata['subject']);
        }
        #   $listingelement = '<!--'.$msg['id'].'-->'.stripslashes($messagedata["campaigntitle"]);
        if ($msg['status'] == 'draft') {
            $editlink = PageUrl2('send&id=' . $msg['id']);
        }
        $ls->addElement($listingelement, $editlink);
        $ls->setClass($listingelement, 'row1');
        $uniqueviews = Sql_Fetch_Row_Query("select count(userid) from {$tables['usermessage']} where viewed is not null and status = 'sent' and messageid = " . $msg['id']);
        $clicks = Sql_Fetch_Row_Query("select sum(clicked) from {$tables['linktrack_ml']} where messageid = " . $msg['id']);
        #    $clicks = array(0);
        /*
                    foreach ($messagedata as $key => $val) {
                      $ls->addColumn($listingelement,$key,$val);
                    }
        */
        $ls->addColumn($listingelement, $GLOBALS['I18N']->get('Entered'), formatDateTime($msg['entered']));
        $_GET['id'] = $msg['id'];
        $statusdiv = '<div id="messagestatus' . $msg['id'] . '">';
        include 'actions/msgstatus.php';
        $statusdiv .= $status;
        $statusdiv .= '</div>';
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:messages.php

示例9: verifyCsrfGetToken

            verifyCsrfGetToken();
            deleteMessage(sprintf('%d', $_GET['delete']));
            print Info($GLOBALS['I18N']->get('campaign deleted'));
            $_SESSION['action_result'] = $GLOBALS['I18N']->get('Campaign deleted');
        }
    }
    $req = Sql_Query(sprintf('select id,entered,subject,unix_timestamp(now()) - unix_timestamp(entered) as age from %s where status = "draft" %s order by entered desc', $GLOBALS['tables']['message'], $ownership));
    $numdraft = Sql_Num_Rows($req);
    if ($numdraft > 0 && !isset($_GET['id']) && !isset($_GET['new'])) {
        print '<p>' . PageLinkActionButton('send&amp;new=1', $I18N->get('start a new message'), '', '', s('Start a new campaign')) . '</p>';
        print '<p><h3>' . $I18N->get('Choose an existing draft message to work on') . '</h3></p><br/>';
        $ls = new WebblerListing($I18N->get('Draft messages'));
        $ls->noShader();
        while ($row = Sql_Fetch_Array($req)) {
            $element = '<!--' . $row['id'] . '-->' . $row['subject'];
            $ls->addElement($element, PageUrl2('send&amp;id=' . $row['id']));
            $ls->setClass($element, 'row1');
            #    $ls->addColumn($element,$I18N->get('edit'),PageLink2('send&amp;id='.$row['id'],$I18N->get('edit')));
            $ls->addColumn($element, $I18N->get('entered'), $row['entered']);
            $ls->addColumn($element, $I18N->get('age'), secs2time($row['age']));
            $ls->addRow($element, '', '<a class="del" href="' . PageUrl2('send&amp;delete=' . $row['id']) . '" title="' . $I18N->get('del') . '">' . $I18N->get('del') . '</a>');
        }
        $ls->addButton($I18N->get('delete all'), PageUrl2('send&amp;delete=alldraft'));
        print $ls->display();
        return;
    }
}
include "send_core.php";
if ($done) {
    if ($GLOBALS["commandline"]) {
        ob_end_clean();
开发者ID:Gerberus,项目名称:phplist3,代码行数:31,代码来源:send.php

示例10: explode

    $users = explode("\n", $_POST['usercheck']);
    foreach ($users as $user) {
        $user = trim($user);
        if (isset($_POST['check']) && $_POST['check'] == 'foreignkey') {
            $exists = Sql_Query(sprintf('select id,foreignkey,email from %s where foreignkey = "%s"', $tables['user'], sql_escape($user)));
        } else {
            $exists = Sql_Query(sprintf('select id,foreignkey,email from %s where email = "%s"', $tables['user'], sql_escape($user)));
        }
        if (Sql_Num_Rows($exists)) {
            $id = Sql_Fetch_Array($exists);
            $element = strip_tags($user);
            $lsexist->addElement($element, PageUrl2('user&amp;id=' . $id['id']));
            $lsexist->addColumn($element, $GLOBALS['I18N']->get('email'), $id['email']);
            $lsexist->addColumn($element, $GLOBALS['I18N']->get('key'), $id['foreignkey']);
        } else {
            $lsnonexist->addElement(strip_tags($user));
        }
    }
    print $lsexist->display();
    print $lsnonexist->display();
} else {
    $_POST['usercheck'] = '';
}
/*
print $GLOBALS["I18N"]->get("Page to check the existence of users in the database");
*/
$content .= '<form method="post" action="">';
$content .= '<table class="usercheckForm">';
$content .= '<tr><td>' . s('What is the type of information you want to check') . '</td></tr>';
$content .= '<tr><td><label for="foreignkey">' . s('Foreign Key') . '</label> <input type="radio" id="foreignkey" name="check" value="foreignkey"></td></tr>';
$content .= '<tr><td><label for="email">' . s('Email') . '</label> <input type="radio" id="email" name="check" value="email"></td></tr>';
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:usercheck.php

示例11: dirname

<?php

include dirname(__FILE__) . '/structure.php';
if (!defined('PHPLISTINIT')) {
    exit;
}
print '<h3>' . s('Database structure check') . '</h3>';
unset($_SESSION["dbtables"]);
$pass = true;
$ls = new WebblerListing(s('Database structure'));
while (list($table, $tablename) = each($GLOBALS["tables"])) {
    $createlink = '';
    $indexes = $uniques = $engine = $category = '';
    $ls->addElement($table);
    if ($table != $tablename) {
        $ls->addColumn($table, "real name", $tablename);
    }
    if (Sql_Table_Exists($tablename)) {
        $req = Sql_Query("show columns from {$tablename}", 0);
        $columns = array();
        if (!Sql_Affected_Rows()) {
            $ls->addColumn($table, "exist", $GLOBALS["img_cross"]);
        }
        while ($row = Sql_Fetch_Array($req)) {
            $columns[strtolower($row["Field"])] = $row["Type"];
        }
        $tls = new WebblerListing($table);
        if (isset($DBstruct[$table])) {
            $struct = $DBstruct[$table];
        } else {
            $struct = '';
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:dbcheck.php

示例12: dirname

<?php

require_once dirname(__FILE__) . '/accesscheck.php';
$req = Sql_Query(sprintf('select * from %s where date_add(from_unixtime(unixdate),interval 12 month) > now() order by unixdate', $GLOBALS['tables']['userstats']));
$ls = new WebblerListing($GLOBALS['I18N']->get('Statistics'));
while ($row = Sql_Fetch_Array($req)) {
    $element = $GLOBALS['I18N']->get($row['item']);
    $ls->addElement($element);
    switch (STATS_INTERVAL) {
        case 'monthly':
            $date = date('M y', $row['unixdate']);
            break;
    }
    $ls->addColumn($element, $date, $row['value']);
}
print $ls->display();
开发者ID:MarcelvC,项目名称:phplist3,代码行数:16,代码来源:subscriberstats.php

示例13: Help

 $forwardcontent .= '<div class="field"><label for="forwardfooter">' . $GLOBALS['I18N']->get('forwardfooter') . Help('forwardfooter') . '</label>' . '
 <textarea name="forwardfooter" cols="65" rows="5">' . htmlspecialchars($messagedata['forwardfooter']) . '</textarea></div>';
 if (ALLOW_ATTACHMENTS) {
     // If we have a message id saved, we want to query the attachments that are associated with this
     // message and display that (and allow deletion of!)
     $att_content = '<div class="field"><label for="attach">' . $GLOBALS['I18N']->get('Add attachments to your campaign') . Help('attachments') . '</label>';
     $att_content .= '<div class="info">
   ' . $GLOBALS['I18N']->get('The upload has the following limits set by the server') . ':<br/>
   ' . $GLOBALS['I18N']->get('Maximum size of total data being sent to the server') . ': ' . ini_get('post_max_size') . '<br/>
   ' . $GLOBALS['I18N']->get('Maximum size of each individual file') . ': ' . ini_get('upload_max_filesize') . '</div>';
     if ($id) {
         $result = Sql_Query(sprintf('Select Att.id, Att.filename, Att.remotefile, Att.mimetype, Att.description, Att.size, MsgAtt.id linkid' . ' from %s Att, %s MsgAtt where Att.id = MsgAtt.attachmentid and MsgAtt.messageid = %d', $tables['attachment'], $tables['message_attachment'], $id));
         $ls = new WebblerListing($GLOBALS['I18N']->get('Current Attachments'));
         $totalSize = 0;
         while ($row = Sql_fetch_array($result)) {
             $ls->addElement($row['id']);
             $ls->addColumn($row['id'], $GLOBALS['I18N']->get('filename'), $row['remotefile']);
             $ls->addColumn($row['id'], $GLOBALS['I18N']->get('desc'), $row['description']);
             $ls->addColumn($row['id'], $GLOBALS['I18N']->get('size'), formatBytes($row['size']));
             $totalSize += $row['size'];
             $phys_file = $GLOBALS['attachment_repository'] . '/' . $row['filename'];
             if (is_file($phys_file) && filesize($phys_file)) {
                 $ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_tick']);
             } else {
                 $ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_cross']);
             }
             $ls->addColumn($row['id'], $GLOBALS['I18N']->get('del'), sprintf('<input type="checkbox" name="deleteattachments[]" value="%s"/>', $row['linkid']));
         }
         $ls->addButton(s('Delete checked'), 'javascript:document.sendmessageform.submit()');
         $att_content .= '<div>' . $ls->display() . '</div>';
     }
开发者ID:hktang,项目名称:phplist3,代码行数:31,代码来源:send_core.php

示例14: sprintf

    $query = 'select * from %s %s order by entered desc, id desc %s';
    $query = sprintf($query, $tables['eventlog'], $where, $limit);
    $result = Sql_query($query);
} else {
    $query = 'select * from %s %s order by entered desc, id desc';
    $query = sprintf($query, $tables['eventlog'], $where);
    $result = Sql_Query($query);
}
$buttons = new ButtonGroup(new Button(PageURL2("eventlog"), 'delete'));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('Are you sure you want to delete all events older than 2 months?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteprocessed"), $GLOBALS['I18N']->get('Delete all (&gt; 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('Are you sure you want to delete all events matching this filter?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteall{$find_url}"), $GLOBALS['I18N']->get('Delete all')));
print $buttons->show();
if (!Sql_Num_Rows($result)) {
    print '<p class="information">' . $GLOBALS['I18N']->get('No events available') . '</p>';
}
printf('<form method="get" action="">
<input type="hidden" name="page" value="eventlog" />
<input type="hidden" name="start" value="%d" />
%s: <input type="text" name="filter" value="%s" /> %s <input type="checkbox" name="exclude" value="1" %s />
</form><br/>', $start, $GLOBALS['I18N']->get('Filter'), htmlspecialchars(stripslashes($filter)), $GLOBALS['I18N']->get('Exclude filter'), $exclude == 1 ? 'checked="checked"' : '');
$ls = new WebblerListing($GLOBALS['I18N']->get('Events'));
# @@@@ Looks like there are a few del, page, date, message which may not be i18nable.
while ($event = Sql_fetch_array($result)) {
    $ls->addElement($event["id"]);
    $ls->setClass($event["id"], 'row1');
    $ls->addColumn($event["id"], $GLOBALS['I18N']->get('date'), $event["entered"]);
    $ls->addColumn($event["id"], $GLOBALS['I18N']->get('message'), strip_tags($event["entry"]));
    $delete_url = sprintf('<a href="javascript:deleteRec(\'%s\');" class="del" >%s</a>', PageURL2("eventlog", "delete", "start={$start}&amp;delete=" . $event["id"]), $GLOBALS['I18N']->get('del'));
    $ls->addRow($event['id'], '<div class="listingsmall">' . $GLOBALS['I18N']->get('page') . ': ' . $event["page"] . '</div>', '<div class="fright">' . $delete_url . '&nbsp;&nbsp;</div>');
}
print $ls->display();
开发者ID:dehvCurtis,项目名称:phplist,代码行数:31,代码来源:eventlog.php

示例15: WebblerListing

     $item['collate'] = false;
 }
 $req = Sql_Query($item['query']);
 $ls = new WebblerListing('');
 $chartData = array();
 $collation = 0;
 while ($row = Sql_Fetch_Assoc($req)) {
     if (!isset($chartData[$row['year']]) || !is_array($chartData[$row['year']])) {
         $chartData[$row['year']] = array();
     }
     if ($item['collate']) {
         $collation = $collation + $row['num'];
         $row['num'] = $collation;
     }
     if ($item['range'] != 'year') {
         $ls->addElement($row['year'] . ' ' . monthName($row['month']));
         $ls->addColumn($row['year'] . ' ' . monthName($row['month']), '#', $row['num']);
         $chartData[$row['year']][$row['month']] = $row['num'];
     } else {
         $ls->addElement($row['year']);
         $ls->addColumn($row['year'], '#', $row['num']);
         $chartData[$row['year']][''] = $row['num'];
     }
     if (!empty($row['year']) && !empty($row['month']) && !empty($row['num'])) {
         cl_output($item['name'] . '|' . $row['year'] . '|' . $row['month'] . '|' . $row['num']);
     }
 }
 unset($chartData['2000']);
 unset($chartData['2001']);
 unset($chartData['2002']);
 unset($chartData['2003']);
开发者ID:hktang,项目名称:phplist3,代码行数:31,代码来源:systemstats.php


注:本文中的WebblerListing::addElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。