Ejemplo n.º 1
0
    $alldone = 0;
    $html .= $GLOBALS['img_cross'];
}
$html .= '</td></tr>';
$html .= '<tr><td>' . s('Create a subscribe page') . '</td>
<td>' . PageLink2('spage', s('Go there')) . '</td><td>';
$req = Sql_Query("select * from {$tables['subscribepage']}");
if (Sql_Affected_Rows()) {
    $html .= $GLOBALS['img_tick'];
} else {
    $alldone = 0;
    $html .= $GLOBALS['img_cross'];
}
$html .= '</td></tr>';
$html .= '<tr><td>' . s('Add some subscribers') . '</td>
<td>' . PageLink2('import', s('Go there')) . '</td><td>';
$req = Sql_Fetch_Row_Query("select count(*) from {$tables['user']}");
if ($req[0] > 2) {
    $html .= $GLOBALS['img_tick'];
} else {
    $alldone = 0;
    $html .= $GLOBALS['img_cross'];
}
$html .= '</td></tr>';
$html .= '</table>';
if ($alldone) {
    $html .= Info($GLOBALS['I18N']->get('Congratulations, phpList is set up, you are ready to start mailing'), 1) . '<br/>' . PageLinkActionButton('send', s('Start a message campaign'));
    unset($_SESSION['firstinstall']);
}
$panel = new UIPanel($GLOBALS['I18N']->get('configuration steps'), $html);
print $panel->display();
Ejemplo n.º 2
0
        $allReady = false;
        $pluginerror = preg_replace("/\n/", '', $pluginerror);
        $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
    $("#addtoqueue").append(\'<div class="missing">' . $pluginerror . '</div>\');
    </script>';
    }
}
if ($allReady) {
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").html(\'<input class="action-button" type="submit" name="send" id="addtoqueuebutton" value="' . htmlspecialchars(str_replace("'", "\\'", s('Place Campaign in Queue for Sending'))) . '">\');
  </script>';
} else {
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").append(\'<div class="error">' . $GLOBALS['I18N']->get('Some required information is missing. The send button will be enabled when this is resolved.') . '</div>\');
//  $("#addtoqueue").append(\'<button class="submit" type="submit" name="save" id="addtoqueuebutton" disabled="disabled">' . $GLOBALS['I18N']->get('Send Campaign') . '</button>\');
  </script>';
}
$saveDraftButton = '<div class="sendSubmit">
    <input class="submit" type="submit" name="savedraft" value="' . s('Save as draft') . '"/>
    <input type="hidden" name="id" value="' . $id . '"/>
    <input type="hidden" name="status" value="draft"/> <input class="submit" type="submit" name="save" value="' . s('Save and continue editing') . '"/>
    <input type="hidden" name="id" value="' . $id . '"/>
    <input type="hidden" name="status" value="draft"/></div>
';
$titleInput = '<label for="campaigntitle">' . s('Campaign Title') . Help('campaigntitle') . '</label>' . '<input type="text" name="campaigntitle"  id="campaigntitleinput"
    value="' . htmlentities($messagedata['campaigntitle'], ENT_QUOTES, 'UTF-8') . '" size="60" />';
$metaPanel = new UIPanel(s('Meta data'), $titleInput);
$metaPanel->setID('metadata');
$testpanel = new UIPanel(s('Send Test'), $sendtest_content);
$testpanel->setID('testpanel');
# print $testpanel->display();
Ejemplo n.º 3
0
              */
        if (in_array('lists', $columns)) {
            $lists = Sql_query('SELECT count(*) FROM ' . $tables['listuser'] . ',' . $tables['list'] . ' where userid = ' . $user['id'] . ' and ' . $tables['listuser'] . '.listid = ' . $tables['list'] . '.id');
            $membership = Sql_fetch_row($lists);
            $ls->addColumn($user['email'], $GLOBALS['I18N']->get('lists'), $membership[0]);
        }
        if (in_array('messages', $columns)) {
            $msgs = Sql_query('SELECT count(*) FROM ' . $tables['usermessage'] . ' where userid = ' . $user['id'] . ' and status = "sent"');
            $nummsgs = Sql_fetch_row($msgs);
            $ls_msgs = $GLOBALS['I18N']->get('msgs') . ':&nbsp;' . $nummsgs[0];
        }
        ### allow plugins to add columns
        if (isset($GLOBALS['plugins']) && is_array($GLOBALS['plugins'])) {
            foreach ($GLOBALS['plugins'] as $plugin) {
                if (method_exists($plugin, 'displayUsers')) {
                    $plugin->displayUsers($user, $user['email'], $ls);
                }
            }
        }
        $ls_bncs = '';
        if (in_array('bounces', $columns) && !empty($user['bouncecount'])) {
            $ls_bncs = $GLOBALS['I18N']->get('bncs') . ': ' . $user['bouncecount'];
        }
        $ls->addRow($user['email'], "<div class='listinghdname gray'>" . $ls_msgs . '<br />' . $ls_bncs . '</div>', $ls_del . '&nbsp;' . $ls_confirmed);
    }
    print $ls->display();
    if (!$some && !$total) {
        $p = new UIPanel($GLOBALS['I18N']->get('no results'), $GLOBALS['I18N']->get('No users apply'));
        print $p->display();
    }
}
Ejemplo n.º 4
0
 function display($add_index = 0, $class = "")
 {
     $html = "";
     if (!sizeof($this->elements)) {
         return "";
     }
     #   if ($add_index)
     #     $html = $this->index();
     $html .= $this->listingStart($class);
     if (!empty($this->insideNav)) {
         $html .= sprintf('<tr><td colspan="%d">%s</td></tr>', sizeof($this->columns) + 1, $this->insideNav);
     }
     if (!$this->suppressHeader) {
         $html .= $this->listingHeader();
     }
     #    global $float_menu;
     #    $float_menu .= "<a style=\"display: block;\" href=\"#".htmlspecialchars($this->title)."\">$this->title</a>";
     if ($this->sort) {
         usort($this->elements, array($this, "cmp"));
     }
     if ($this->sortcolumn) {
         usort($this->elements, array($this, "cmp"));
     }
     foreach ($this->elements as $element) {
         $html .= $this->listingElement($element);
     }
     $html .= $this->listingEnd();
     if ($this->usePanel) {
         $p = new UIPanel($this->title, $html, $this->panelNav);
         return $p->display();
     }
     if (!$this->useShader) {
         return $html;
     }
     $shader = new WebblerShader($this->title);
     $shader->addContent($html);
     $shader->display = $this->initialstate;
     $html = $shader->shaderStart();
     $html .= $shader->header();
     $html .= $shader->dividerRow();
     $html .= $shader->contentDiv();
     $html .= $shader->footer();
     return $html;
 }
Ejemplo n.º 5
0
  <td><input type="checkbox" name="checkimagesexist" <?php 
    echo $checkimagesexist ? 'checked="checked"' : '';
    ?>
 /></td>
</tr>
<?php 
}
?>
<tr>
  <td colspan="2"><input class="submit" type="submit" name="save" value="<?php 
echo $GLOBALS['I18N']->get('Save Changes');
?>
" /></td>
</tr>
</table>
</div>
<?php 
$sendtest_content = sprintf('<div class="sendTest" id="sendTest">
    ' . $sendtestresult . '
    <input class="submit" type="submit" name="sendtest" value="%s"/>  %s: 
    <input type="text" name="testtarget" size="40" value="' . htmlspecialchars($testtarget) . '"/><br />%s
    </div>', $GLOBALS['I18N']->get('Send test message'), $GLOBALS['I18N']->get('to email addresses'), $GLOBALS['I18N']->get('(comma separate addresses - all must be existing subscribers)'));
$testpanel = new UIPanel($GLOBALS['I18N']->get('Send Test'), $sendtest_content);
$testpanel->setID('testpanel');
#  if ($systemTemplateID == $id) { ## for now, testing only for system message templates
print $testpanel->display();
#  }
?>

</form>
Ejemplo n.º 6
0
while ($row = Sql_Fetch_Array($req)) {
    ++$c;
    if ($c % 1 == 0) {
        $mailinglistsHTML .= '</tr><tr>';
    }
    if (in_array($row['id'], $subscribed)) {
        $bgcol = '#F7E7C2';
        $subs = 'checked="checked"';
    } else {
        $bgcol = '#ffffff';
        $subs = '';
    }
    $mailinglistsHTML .= sprintf('<td class="tdcheck" bgcolor="%s"><input type="checkbox" name="subscribe[]" value="%d" %s /> %s</td>', $bgcol, $row['id'], $subs, stripslashes($row['name']));
}
$mailinglistsHTML .= '</tr>';
if ($access != 'view') {
    $mailinglistsHTML .= '<tr><td class="bgwhite"><input class="submit" type="submit" name="change" value="' . $GLOBALS['I18N']->get('Save Changes') . '" /></td></tr>';
}
$mailinglistsHTML .= '</table>';
print '<div class="tabbed">';
print '<ul>';
print '<li><a href="#details">' . ucfirst($GLOBALS['I18N']->get('Details')) . '</a></li>';
print '<li><a href="#lists">' . ucfirst($GLOBALS['I18N']->get('Lists')) . '</a></li>';
print '</ul>';
$p = new UIPanel('', $userdetailsHTML);
print '<div id="details">' . $p->display() . '</div>';
$p = new UIPanel('', $mailinglistsHTML);
print '<div id="lists">' . $p->display() . '</div>';
print '</div>';
## end of tabbed
print '</form>';
Ejemplo n.º 7
0
        $groupsHTML .= '<select name="newgroup">';
        foreach ($groups as $key => $val) {
            $groupsHTML .= sprintf('<option value="%d">%s</option>', $key, $val);
        }
        $groupsHTML .= '</select>';
    }
    $groupsHTML .= '</td></tr>';
    if ($access != "view") {
        $groupsHTML .= '<tr><td><input type="submit" name="change" value="' . $GLOBALS['I18N']->get('Save changes') . '" /></td></tr>';
    }
    $groupsHTML .= '</table>';
}
print '<div class="tabbed">';
print '<ul>';
print '<li><a href="#details">' . ucfirst($GLOBALS['I18N']->get('Details')) . '</a></li>';
print '<li><a href="#lists">' . ucfirst($GLOBALS['I18N']->get('Lists')) . '</a></li>';
if ($usegroups) {
    print '<li><a href="#groups">Groups</a></li>';
}
print '</ul>';
$p = new UIPanel('', $userdetailsHTML);
print '<div id="details">' . $p->display() . '</div>';
$p = new UIPanel('', $mailinglistsHTML);
print '<div id="lists">' . $p->display() . '</div>';
if ($usegroups) {
    $p = new UIPanel($GLOBALS['I18N']->get('Groups'), $groupsHTML);
    print '<div id="groups">' . $p->display() . '</div>';
}
print '</div>';
## end of tabbed
print '</form>';