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


PHP WebblerListing::addButton方法代码示例

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


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

示例1: sprintf

         $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>";
         #      $tabletext .= "</tr>\n";
     }
     $ls->addButton($GLOBALS['I18N']->get('delchecked'), "javascript:document.sendmessageform.submit()");
     $att_content .= '<tr><td colspan=2>' . $ls->display() . '</td></tr>';
     #    if ($tabletext) {
     #      print "<tr><td colspan=2><table border=1><tr><td>Filename</td><td>Description</td><td>Size</td><td>&nbsp;</td></tr>\n";
     #      print "$tabletext";
     #      print "<tr><td colspan=4 align=\"center\"><input type=submit name=deleteatt value=\"Delete Checked\"></td></tr>";
     #      print "</table></td></tr>\n";
     #    }
 }
 for ($att_cnt = 1; $att_cnt <= NUMATTACHMENTS; $att_cnt++) {
     $att_content .= sprintf('<tr><td>%s</td><td><input type=file name="attachment%d">&nbsp;&nbsp;<input type=submit name="save" value="%s"></td></tr>', $GLOBALS['I18N']->get('newattachment'), $att_cnt, $GLOBALS['I18N']->get('addandsave'));
     if (FILESYSTEM_ATTACHMENTS) {
         $att_content .= sprintf('<tr><td><b>%s</b> %s:</td><td><input type=text name="localattachment%d" size="50"></td></tr>', $GLOBALS['I18N']->get('or'), $GLOBALS['I18N']->get('pathtofile'), $att_cnt, $att_cnt);
     }
     $att_content .= sprintf('<tr><td colspan=2>%s:</td></tr>
 <tr><td colspan=2><textarea name="attachment%d_description" cols=65 rows=3 wrap="virtual"></textarea></td></tr>', $GLOBALS['I18N']->get('attachmentdescription'), $att_cnt);
开发者ID:kvervo,项目名称:phplist-aiesec,代码行数:31,代码来源:send_core.php

示例2: while

     $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>';
 }
 if (defined('MAX_MAILSIZE') && 3 * $totalSize > MAX_MAILSIZE) {
     ## the 3 is roughly the size increase to encode the string
     $att_content .= Warn(s('The total size of attachments is very large. Sending this campaign may fail due to resource limits.'));
 }
 for ($att_cnt = 1; $att_cnt <= NUMATTACHMENTS; ++$att_cnt) {
     $att_content .= sprintf('<div>%s</div><div><input type="file" name="attachment%d"/>&nbsp;&nbsp;<input class="submit" type="submit" name="save" value="%s"/></div>', $GLOBALS['I18N']->get('New Attachment'), $att_cnt, $GLOBALS['I18N']->get('Add (and save)'));
     if (FILESYSTEM_ATTACHMENTS) {
         $att_content .= sprintf('<div><b>%s</b> %s:</div><div><input type="text" name="localattachment%d" size="50"/></div>', $GLOBALS['I18N']->get('or'), $GLOBALS['I18N']->get('Path to file on server'), $att_cnt, $att_cnt);
     }
     $att_content .= sprintf('<div>%s:</div>
 <div><textarea name="attachment%d_description" cols="65" rows="3" wrap="virtual"></textarea></div>', $GLOBALS['I18N']->get('Description of attachment'), $att_cnt);
 }
 $att_content .= '</div>';
开发者ID:hktang,项目名称:phplist3,代码行数:31,代码来源:send_core.php

示例3: PageLinkActionButton

    $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();
        print clineSignature();
        print "Message with subject " . $_POST["subject"] . " was sent to " . $lists . "\n";
        exit;
    }
    return;
}
/*if (!$_GET["id"]) {
开发者ID:Gerberus,项目名称:phplist3,代码行数:31,代码来源:send.php

示例4: Redirect

        Redirect('list');
    } else {
        Info(s('Categories saved'), true);
    }
}
$req = Sql_Query(sprintf('select * from %s %s', $tables['list'], $subselect));
if (!Sql_Affected_Rows()) {
    Info(s('All lists have already been assigned a category') . '<br/>' . PageLinkButton('list', s('Back')), true);
}
print '<div class="fright">' . PageLinkButton('catlists&show=all', s('Re-edit all lists')) . '</div>';
print '<div class="fright">' . PageLinkButton('configure&id=list_categories&ret=catlists', $I18N->get('Configure Categories')) . '</div>';
$ls = new WebblerListing(s('Categorise lists'));
$aListCategories = listCategories();
if (count($aListCategories)) {
    while ($row = Sql_Fetch_Assoc($req)) {
        $ls->addELement($row['id']);
        $ls->addColumn($row['id'], $GLOBALS['I18N']->get('Name'), stripslashes($row['name']));
        $catselect = '<select name="category[' . $row['id'] . ']">';
        $catselect .= '<option value="">-- ' . s('choose category') . '</option>';
        $catselect .= '<option value="">-- ' . s('none') . '</option>';
        foreach ($aListCategories as $category) {
            $category = trim($category);
            $catselect .= sprintf('<option value="%s" %s>%s</option>', $category, $category == $row['category'] ? 'selected="selected"' : '', $category);
        }
        $catselect .= '</select>';
        $ls->addColumn($row['id'], s('Category'), $catselect);
    }
}
$ls->addButton(s('save'), 'javascript:document.categoryedit.submit();');
print $ls->display();
print '</form>';
开发者ID:MarcelvC,项目名称:phplist3,代码行数:31,代码来源:catlists.php

示例5: foreach

    # var_dump( $used_systemattr);
    foreach ($_SESSION["import_attribute"] as $column => $rec) {
        /*
            print '<pre>';
            print '<br/>'.$column.'<br/>';
            var_dump($rec);
            print '</pre>';
        */
        if (trim($column) != '' && !$rec["record"]) {
            $request_mapping = 1;
            $ls->addElement($column);
            $ls->addColumn($column, $GLOBALS['I18N']->get('select'), '<select name="column' . $rec["index"] . '">' . $options . '</select>');
        }
    }
    if ($request_mapping) {
        $ls->addButton($GLOBALS['I18N']->get('Continue'), 'javascript:document.importform.submit()');
        print '<p class="information">' . $GLOBALS['I18N']->get('Please identify the target of the following unknown columns') . '</p>';
        print '<form name="importform" method="post">';
        print $ls->display();
        print '</form>';
        /*
            print '<pre>';
            var_dump($_SESSION['import_attribute']);
            print '</pre>';
        */
        return;
    }
}
### show summary
if (!empty($_SESSION["test_import"])) {
    if (!isset($_SESSION["systemindex"]["email"])) {
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:import2.php

示例6: addslashes

        }
        $tc++;
    }
}
if ($num) {
    $userselection_query = "select {$select_clause} where {$where_clause}";
    #    $count_query = addslashes($count_query);
    if ($_GET["calculate"]) {
        ob_end_flush();
        print "<h3>{$userselection_query}</h3>";
        print '<p class="information">Calculating ...';
        flush();
        $req = Sql_Query($userselection_query);
        print '.. ' . Sql_Num_Rows($req) . " users apply</p>";
    }
    $ls->addButton("Calculate", $baseurl . '&amp;tab=' . $_GET["tab"] . '&amp;calculate="1"');
    $ls->addButton("Reset", $baseurl . '&amp;tab=' . $_GET["tab"] . '&amp;reset="1"');
    $existing_criteria = $ls->display();
}
$att_js = '
<script language="Javascript" type="text/javascript">
  var values = Array();
  var operators = Array();
  var value_divs = Array();
  var value_default = Array();
';
if (sizeof($used_attributes)) {
    $already_used = ' and id not in (' . join(',', $used_attributes) . ')';
} else {
    $already_used = "";
}
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:31,代码来源:usermgt.php

示例7: printf

      $ls->addColumn($row["id"],"filename",$row["remotefile"]);
      $ls->addColumn($row["id"],"desc",$row["description"]);
      $ls->addColumn($row["id"],"size",$row["size"]);
      $phys_file = $GLOBALS["attachment_repository"]."/".$row["filename"]; 
      if (is_file($phys_file) && filesize($phys_file)) {
        $ls->addColumn($row["id"],"file",$GLOBALS["img_tick"]);
      } else {
        $ls->addColumn($row["id"],"file",$GLOBALS["img_cross"]);
      }
      $ls->addColumn($row["id"],"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>";
#			$tabletext .= "</tr>\n";
		}
    $ls->addButton("Delete Checked","javascript:document.sendmessageform.submit()");
    print '<tr><td colspan=2>'.$ls->display().'</td></tr>';

#		if ($tabletext) {
#			print "<tr><td colspan=2><table border=1><tr><td>Filename</td><td>Description</td><td>Size</td><td>&nbsp;</td></tr>\n";
#			print "$tabletext";
#			print "<tr><td colspan=4 align=\"center\"><input type=submit name=deleteatt value=\"Delete Checked\"></td></tr>";
#			print "</table></td></tr>\n";
#		}
	}
	for ($att_cnt = 1;$att_cnt <= NUMATTACHMENTS;$att_cnt++) {
  	printf ('<tr><td>New Attachment</td><td><input type=file name="attachment%d">&nbsp;&nbsp;<input type=submit name="save" value="Add (and save)"></td></tr>',$att_cnt);
    if (FILESYSTEM_ATTACHMENTS) {
	    printf('<tr><td><b>or</b> path to file on server:</td><td><input type=text name="localattachment%d" size="50"></td></tr>',$att_cnt,$att_cnt);
  	}
    printf ('<tr><td colspan=2>Description of attachment:</td></tr>
开发者ID:radicaldesigns,项目名称:amp,代码行数:31,代码来源:send_core.php


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