$pages = $content_template_parse->pages; $number = $content_template_parse->number; } ?> <?php $n = 1; if (is_array($rs)) { foreach ($rs as $r) { ?> <div class="col-xs-6"> <div class="thumbnail " style="padding:0px; border:0px; margin-bottom: 30px;"> <div class="pichend"><a href="<?php echo $r['url']; ?> " target="_blank"><img src="<?php echo imagecut($r['thumb'], 222, 150, 4); ?> " class="imgysg animated"></a> </div> <div class="caption" style="color: #26496D; text-align:center; background:#f1f1f1"> <?php echo $r['title']; ?> </div> </div> </div> <?php $n++; } } ?>
$where = "`modelid`={$modelid}"; } else { $where = ''; } $db = load_class('db'); $start = 0; $starttime = date('Y-m-d H:i:s'); $c_time = time(); while (1) { ob_end_clean(); $result = $db->get_list($master_table, $where, 'id,thumb,modelid', $start, 2, 0, 'id DESC'); if (empty($result)) { $e_time = time(); $r_time = $e_time - $c_time . "s\r\r"; exit("\r\nFinish!!!\r\nStart Time:" . $starttime . "\r\nEnd Time:" . date('Y-m-d H:i:s') . "\r\nTotal Time:" . $r_time . "\r\n"); } foreach ($result as $rs) { if (empty($rs['thumb'])) { continue; } print_r($rs); $rs['thumb'] = str_replace('img_300_600_', '', $rs['thumb']); http: //dev.wuzhicms.com/uploadfile/2015/05/1247/img_300_600_201505121147282152.jpg $newimage = imagecut($rs['thumb'], 300, 600, 2); $db->update($master_table, array('thumb' => $newimage), array('id' => $rs['id'])); } $start += 2; echo "running...\r\n"; sleep(1); }
<?php $n = 1; if (is_array($pictures)) { foreach ($pictures as $r) { ?> <figure itemprop="associatedMedia"> <a href="<?php echo $r['url']; ?> " itemprop="contentUrl" data-size="<?php echo imagesize($r['url']); ?> "> <img src="<?php echo imagecut($r['url'], 630, 460, 2); ?> " itemprop="thumbnail" alt="<?php echo $r['alt']; ?> " /> </a> <div class="ext-info"> <figcaption itemprop="caption description"><?php echo $r['alt']; ?> </figcaption> </div> </figure> <?php $n++;
} ?> <ul> <?php $n = 1; if (is_array($rs)) { foreach ($rs as $r) { ?> <div class="tit"><?php echo $r["title"]; ?> </div><a href="<?php echo $r["url"]; ?> "><img src="<?php echo imagecut($r["thumb"], 600, 400, 4); ?> "/></a> <?php $n++; } } ?> </ul> <?php if (defined('IN_ADMIN') && !defined('HTML')) { echo '</div>'; } ?> </div> </section>