">Last update</a></th> <th class='actions'>Actions</th> </tr> <?php foreach ($all_products as $product) { ?> <tr> <td><img src="<?php echo DIR_SHOW_SM_IMG . $product['smallimg']; ?> " alt="" /></td> <td><a href="<?php echo $ppi . $product['id']; ?> "><?php echo cutstring($product['name'], 56); ?> </a></td> <td><?php echo $product['price']; ?> </td> <td><?php echo $product['latestprice']; ?> <?php echo $product['arrow']; ?> </td> <td><a href="<?php echo $product['longurl'];
<th width=8%>知识点</th> <th width=4%>难度</th> <th width=8% colspan="2">操作</th> </thread> <tbody> <?php if (is_array($row)) { foreach ($row as $k => $r) { ?> <tr> <td><?php echo $numofchoose + $k; ?> </td> <td align='left'><?php echo cutstring($r['question']); ?> ... <a tabindex="0" class="pull-right btn btn-xs btn-danger" role="button" data-toggle="popover" data-trigger="focus" data-content="<?php echo $r['question']; ?> ">展开>></a> <!-- <button type="button" class="pull-right btn btn-danger btn-xs" data-toggle="tooltip" data-placement="right" data-original-title="<?php echo htmlspecialchars($r['question']); ?> ">展开>></button> --> </td>
/** * display a page of thumbnails * * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * @param imageList (array) list containing all image file names * @param fileList (array) file properties * @param page (int) current page number * @param thumbnailWidth (int) width of thumbnails * @param colWidth (int) width of columns * @param numberOfCols (int) number of columns * @param numberOfRows (int) number of rows * @global curDirPath */ function display_thumbnails($imageList, $fileList, $page, $thumbnailWidth, $colWidth, $numberOfCols, $numberOfRows) { global $curDirPath; global $searchCmdUrl; // get index of first thumbnail on the page $displayed = get_offset($page); $html = ''; // loop on rows for ($rows = 0; $rows < $numberOfRows; $rows++) { $html .= "<tr>\n"; // loop on columns for ($cols = 0; $cols < $numberOfCols; $cols++) { // get index of image $num = $imageList[$displayed]; // get file name $fileName = $fileList[$num]['path']; // visibility style if ($fileList[$num]['visibility'] == 'i') { $style = "style=\"font-style: italic; color: silver;\""; } else { $style = ''; } // display thumbnail /*echo "<td style=\"text-align: center;\" style=\"width:" . $colWidth . "%;\">\n" ;*/ // omit colwidth since already in th $html .= "<td style=\"text-align: center;\">\n"; $html .= "<a href=\"" . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . "?docView=image&file=" . download_url_encode($fileName) . "&cwd=" . $curDirPath . $searchCmdUrl)) . "\">"; // display image description using title attribute $title = ""; if ($fileList[$num]['comment']) { $text = $fileList[$num]['comment']; $text = cutstring($text, 40, false, 5, "..."); $title = "title=\"" . $text . "\""; } $html .= create_thumbnail($fileName, $thumbnailWidth, $title); // unset title for the next pass in the loop unset($title); $html .= "</a>\n"; // display image name $imgName = strlen(basename($fileList[$num]['path'])) > 25 ? substr(basename($fileList[$num]['path']), 0, 25) . "..." : basename($fileList[$num]['path']); $html .= "<p " . $style . ">" . $imgName . "</p>"; $html .= "</td>\n"; // update image number $displayed++; // finished ? if ($displayed >= count($imageList)) { $html .= "</tr>\n"; return $html; } } // end loop on columns $html .= "</tr>\n"; } // end loop on rows return $html; }
<ul class="pagination"> <?php include 'partials/pagination.php'; ?> </ul> <?php foreach ($posts as $post) { ?> <div class="post"> <blockquote> <p><a href="article.php?id=<?php echo $post['id']; ?> "><?php echo cutstring($post['content'], 100); ?> </a></p> </blockquote> <p style="text-align: right"><?php echo date("d/m/Y", strtotime($post['creation_date'])); ?> par <a href="#"><?php echo ucfirst($post['author']); ?> </a></p> </div> <?php } ?>