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


PHP WebblerListing类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: populate

 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with link click details
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->linkClicks($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('clicks'), $row['clicked']);
         $w->addColumn($key, $this->i18n->get('firstclick'), $row['firstclick']);
         $w->addColumn($key, $this->i18n->get('latestclick'), $row['clicked'] > 1 ? $row['latestclick'] : '');
     }
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:18,代码来源:Linkclicks.php

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: sprintf

        $ls->addElement($overall);
        $ls->addColumn($overall, $GLOBALS['I18N']->get('views'), $viewed['viewed']);
        $perc = sprintf('%0.2f', $viewed['viewed'] / $total['total'] * 100);
        $ls->addColumn($overall, $GLOBALS['I18N']->get('rate'), $perc . ' %');
    }
    print $ls->display();
    return;
}
print '<h1>' . $GLOBALS['I18N']->get('View Details for a Message') . '</h1>';
$messagedata = Sql_Fetch_Array_query("SELECT * FROM {$tables['message']} where id = {$id} {$subselect}");
print '<table>
<tr><td>' . $GLOBALS['I18N']->get('Subject') . '<td><td>' . $messagedata['subject'] . '</td></tr>
<tr><td>' . $GLOBALS['I18N']->get('Entered') . '<td><td>' . $messagedata['entered'] . '</td></tr>
<tr><td>' . $GLOBALS['I18N']->get('Sent') . '<td><td>' . $messagedata['sent'] . '</td></tr>
</table><hr/>';
$ls = new WebblerListing($GLOBALS['I18N']->get('Message Open Statistics'));
$req = Sql_Query(sprintf('select um.userid
    from %s um,%s msg where um.messageid = %d and um.messageid = msg.id and um.viewed is not null %s
    group by userid', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $id, $subselect));
$total = Sql_Affected_Rows();
$start = sprintf('%d', $_GET['start']);
if (isset($start) && $start > 0) {
    $listing = sprintf($GLOBALS['I18N']->get("Listing user %d to %d"), $start, $start + MAX_USER_PP);
    $limit = "limit {$start}," . MAX_USER_PP;
} else {
    $listing = sprintf($GLOBALS['I18N']->get("Listing user %d to %d"), 1, MAX_USER_PP);
    $limit = "limit 0," . MAX_USER_PP;
    $start = 0;
}
if ($id) {
    $url_keep = '&amp;id=' . $id;
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:31,代码来源:mviews.php

示例10: Help

   $forwardcontent .= '<tr><td colspan=2>' . $GLOBALS['I18N']->get("forwardfooter") . '. <br/>
   ' . $GLOBALS['I18N']->get("messageforwardfooterexplanation") . '<br/>' . '.</td></tr>
 <tr><td colspan=2><textarea name=forwardfooter cols=65 rows=5>' . $forwardfooter . '</textarea></td></tr>
 </table>';
   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 = '<table><tr><td colspan=2>' . Help("attachments") . ' ' . $GLOBALS['I18N']->get("addattachments") . ' </td></tr>';
       $att_content .= '<tr><td colspan=2>
     ' . $GLOBALS['I18N']->get("uploadlimits") . ':<br/>
     ' . $GLOBALS['I18N']->get("maxtotaldata") . ': ' . ini_get("post_max_size") . '<br/>
     ' . $GLOBALS['I18N']->get("maxfileupload") . ': ' . ini_get("upload_max_filesize") . '</td></tr>';
       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));
           $tabletext = "";
           $ls = new WebblerListing($GLOBALS['I18N']->get('currentattachments'));
           while ($row = Sql_fetch_array($result)) {
               #      $tabletext .= "<tr><td>".$row["remotefile"]."</td><td>".$row["description"]."&nbsp;</td><td>".$row["size"]."</td>";
               $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'), $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"]));
               // Probably need to check security rights here...
               #      $tabletext .= "<td><input type=checkbox name=\"deleteattachments[]\" value=\"".$row["linkid"]."\"></td>";
开发者ID:kvervo,项目名称:phplist-aiesec,代码行数:31,代码来源:send_core.php

示例11: ob_end_clean

print '</p>';
if ($_GET['type'] == 'dl') {
    ob_end_clean();
    Header("Content-type: text/plain");
    $filename = 'Bounces on ' . listName($listid);
    header("Content-disposition:  attachment; filename=\"{$filename}\"");
}
$currentlist = 0;
$ls = new WebblerListing('');
while ($row = Sql_Fetch_Array($req)) {
    if ($currentlist != $row['listid']) {
        if ($_GET['type'] != 'dl') {
            print $ls->display();
        }
        $currentlist = $row['listid'];
        flush();
        $ls = new WebblerListing(listName($row['listid']));
    }
    $userdata = Sql_Fetch_Array_Query(sprintf('select * from %s where id = %d', $GLOBALS['tables']['user'], $row['userid']));
    if ($_GET['type'] == 'dl') {
        print $userdata['email'] . "\n";
    }
    $ls->addElement($row['userid'], PageUrl2('user&id=' . $row['userid']));
    $ls->addColumn($row['userid'], $GLOBALS['I18N']->get('email'), $userdata['email']);
    $ls->addColumn($row['userid'], $GLOBALS['I18N']->get('# bounces'), $row['numbounces']);
}
if ($_GET['type'] != 'dl') {
    print $ls->display();
} else {
    exit;
}
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:31,代码来源:listbounces.php

示例12: Sql_Fetch_Array_Query

print $ls->display();
print $bouncels->display();
if (isBlackListed($user["email"])) {
    print "<h3>" . $GLOBALS['I18N']->get('user is Blacklisted since') . " ";
    $blacklist_info = Sql_Fetch_Array_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist"], $user["email"]));
    print $blacklist_info["added"] . "</h3><br/>";
    print '';
    print "<a href=\"javascript:deleteRec2('" . str_replace("'", ' ', $GLOBALS['I18N']->get('are you sure you want to delete this user from the blacklist')) . "?\\n" . str_replace("'", ' ', $GLOBALS['I18N']->get('it should only be done with explicit permission from this user')) . "','./?page=userhistory&unblacklist={$user["id"]}&id={$user["id"]}')\">\n  " . $GLOBALS['I18N']->get('remove User from Blacklist') . "</a>" . '<br/><br/>';
    $ls = new WebblerListing($GLOBALS['I18N']->get('Blacklist Info'));
    $req = Sql_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist_data"], $user["email"]));
    while ($row = Sql_Fetch_Array($req)) {
        $ls->addElement($row["name"]);
        $ls->addColumn($row["name"], $GLOBALS['I18N']->get('value'), stripslashes($row["data"]));
    }
    print $ls->display();
}
print "<h3>" . $GLOBALS['I18N']->get('user subscription history') . "</h3>";
$ls = new WebblerListing($GLOBALS['I18N']->get('Subscription History'));
$req = Sql_Query(sprintf('select * from %s where userid = %d order by date desc', $tables["user_history"], $user["id"]));
if (!Sql_Affected_Rows()) {
    print $GLOBALS['I18N']->get('no details found');
}
while ($row = Sql_Fetch_Array($req)) {
    $ls->addElement($row["id"]);
    $ls->addColumn($row["id"], $GLOBALS['I18N']->get('ip'), $row["ip"]);
    $ls->addColumn($row["id"], $GLOBALS['I18N']->get('date'), $row["date"]);
    $ls->addColumn($row["id"], $GLOBALS['I18N']->get('summary'), $row["summary"]);
    $ls->addRow($row["id"], $GLOBALS['I18N']->get('detail'), nl2br(htmlspecialchars($row["detail"])));
    $ls->addRow($row["id"], $GLOBALS['I18N']->get('info'), nl2br($row["systeminfo"]));
}
print $ls->display();
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:31,代码来源:userhistory.php

示例13: sprintf

    $filterpanel .= sprintf('<option value="%d" %s>%s</option>', $row['id'], $row['id'] == $findby ? 'selected="selected"' : '', substr($row['name'], 0, 20));
}
$filterpanel .= '</select><input class="submit" type="submit" value="' . s('Go') . '" />&nbsp;&nbsp;<a href="./?page=users&amp;find=NULL" class="reset">' . s('reset') . '</a>';
$filterpanel .= '</form></div>';
//$filterpanel .= '<tr><td colspan="4"></td></tr>
//</table>';
print Info($countpanel);
$panel = new UIPanel($GLOBALS['I18N']->get('Find subscribers'), $filterpanel);
print $panel->display();
#if (($require_login && isSuperUser()) || !$require_login)
print '<div class="actions">';
print '<div id="add-csv-button">' . PageLinkButton('dlusers', $GLOBALS['I18N']->get('Download all users as CSV file'), 'nocache=' . uniqid('')) . '</div>';
print '<div id="add-user-button">' . PageLinkButton('adduser', $GLOBALS['I18N']->get('Add a User')) . '</div>';
print '</div>';
$some = 0;
$ls = new WebblerListing(s('users'));
$ls->usePanel($paging);
if ($result) {
    while ($user = Sql_fetch_array($result)) {
        $some = 1;
        $ls->addElement($user['email'], PageURL2("user&amp;start={$start}&amp;id=" . $user['id'] . $find_url));
        $ls->setClass($user['email'], 'row1');
        ## we make one column with the subscriber status being "on" or "off"
        ## two columns are too confusing and really unnecessary
        # ON = confirmed &&  !blacklisted
        #    $ls->addColumn($user["email"], $GLOBALS['I18N']->get('confirmed'), $user["confirmed"] ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
        #   if (in_array("blacklist", $columns)) {
        $onblacklist = isBlackListed($user['email']);
        #    $ls->addColumn($user["email"], $GLOBALS['I18N']->get('bl l'), $onblacklist ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
        #  }
        if ($user['confirmed'] && !$onblacklist) {
开发者ID:bramley,项目名称:phplist3,代码行数:31,代码来源:users.php

示例14: Sql_query

$req = Sql_query('select count(*) from ' . $tables['message'] . $whereClause . ' ' . $sortBySql);
$total_req = Sql_Fetch_Row($req);
$total = $total_req[0];
## Browse buttons table
$limit = $_SESSION['messagenumpp'];
$offset = 0;
if (isset($start) && $start > 0) {
    $offset = $start;
} else {
    $start = 0;
}
$paging = '';
if ($total > $_SESSION['messagenumpp']) {
    $paging = simplePaging("messages{$url_keep}", $start, $total, $_SESSION['messagenumpp'], $GLOBALS['I18N']->get('Campaigns'));
}
$ls = new WebblerListing(s('Campaigns'));
$ls->usePanel($paging);
## 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']);
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:messages.php

示例15: 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


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