本文整理汇总了PHP中get_url_image函数的典型用法代码示例。如果您正苦于以下问题:PHP get_url_image函数的具体用法?PHP get_url_image怎么用?PHP get_url_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_url_image函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: block_content
public function block_content($context, array $blocks = array())
{
// line 4
echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>";
// line 6
echo isset($context["module_title"]) ? $context["module_title"] : null;
echo "</h3>\n </div>\n <div class=\"module-body\">\n ";
// line 9
echo get_flashdata("akun");
echo "\n\n ";
// line 11
echo form_open_multipart("admin/ch_profil", array("class" => "form-horizontal row-fluid"));
echo "\n <div class=\"control-group\">\n <label class=\"control-label\">Username (Email) <span class=\"text-error\">*</span></label>\n <div class=\"controls\">\n <input type=\"text\" name=\"username\" class=\"span5\" value=\"";
// line 15
echo twig_escape_filter($this->env, set_value("username", $this->getAttribute(isset($context["login"]) ? $context["login"] : null, "username")), "html", null, true);
echo "\">\n <br>";
// line 16
echo form_error("username");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Nama <span class=\"text-error\">*</span></label>\n <div class=\"controls\">\n <input type=\"text\" name=\"nama\" class=\"span5\" value=\"";
// line 22
echo twig_escape_filter($this->env, set_value("nama", $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nama")), "html", null, true);
echo "\">\n <br>";
// line 23
echo form_error("nama");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Alamat <span class=\"text-error\">*</span></label>\n <div class=\"controls\">\n <input type=\"text\" name=\"alamat\" class=\"span9\" value=\"";
// line 29
echo twig_escape_filter($this->env, set_value("alamat", $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "alamat")), "html", null, true);
echo "\">\n <br>";
// line 30
echo form_error("alamat");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Foto</label>\n <div class=\"controls\">\n <?php if (!is_null(\$pengajar['foto']) AND !empty(\$pengajar['foto'])): ?>\n ";
// line 37
if ($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "foto") != "") {
// line 38
echo " <img src=\"";
echo twig_escape_filter($this->env, get_url_image($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "foto"), "medium"), "html", null, true);
echo "\"><br><br>\n Ganti Foto\n ";
}
// line 41
echo " <input type=\"file\" name=\"userfile\">\n <br>";
// line 42
echo isset($context["error_upload"]) ? $context["error_upload"] : null;
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <div class=\"controls\">\n <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n </div>\n </div>\n ";
// line 50
echo form_close();
echo "\n\n </div>\n</div>\n";
}
开发者ID:Raniratna,项目名称:new_elearning,代码行数:47,代码来源:c6e19ab5aa1efc7340cfc6a17cc0b1f6d796053dc5462caaf0b6db01fae0.php
示例2: date
}
/* 处理 */
$name = date('Ymd');
for ($i = 0; $i < 6; ++$i) {
$name .= chr(mt_rand(97, 122));
}
$name .= '.' . end(explode('.', $_FILES['title_pic']['name']));
$target = ROOT_PATH . DATA_DIR . '/afficheimg/' . $name;
if (move_upload_file($_FILES['title_pic']['tmp_name'], $target)) {
$title_pic = DATA_DIR . '/afficheimg/' . $name;
}
} elseif (!empty($_REQUEST['title_url'])) {
/* 来自互联网图片 不可以是服务器地址 */
if (strstr($_REQUEST['title_url'], 'http') && !strstr($_REQUEST['title_url'], $_SERVER['SERVER_NAME'])) {
/* 取互联网图片至本地 */
$title_pic = get_url_image($_REQUEST['title_url']);
} else {
sys_msg($_LANG['web_url_no']);
}
}
unset($name, $target);
$title_pic = empty($title_pic) ? $_POST['title_img_url'] : $title_pic;
require ROOT_PATH . 'includes/cls_json.php';
$start_time = local_strtotime($_POST['start_time']);
$end_time = local_strtotime($_POST['end_time']);
$json = new JSON();
$tmp_data = $json->decode($_POST['topic_data']);
$data = serialize($tmp_data);
$base_style = $_POST['base_style'];
$keywords = $_POST['keywords'];
$description = $_POST['description'];
示例3: edit
/**
* 编辑专题
*/
public function edit()
{
$id = I('id');
if (!$id) {
$this->redirect(url('index'));
}
if (IS_POST) {
$data = I('data');
/* 数据验证 */
$msg = Check::rule(array(array(Check::must($_POST['topic_name']), L('topic_name_empty')), array(Check::must($_POST['start_time']), L('start_time_empty')), array(Check::must($_POST['end_time']), L('end_time_empty'))));
/* 提示信息 */
if ($msg !== true) {
$this->message($msg, NULL, 'error');
}
$topic_type = empty($data['topic_type']) ? 0 : intval($data['topic_type']);
switch ($topic_type) {
case '0':
case '1':
// 主图上传
if ($_FILES['topic_img']['name'] && $_FILES['topic_img']['size'] > 0) {
$result = $this->ectouchUpload('topic_img', 'topic_image');
if ($result['error'] > 0) {
$this->message($result['message'], NULL, 'error');
}
/* 生成logo链接 */
$topic_img = substr($result['message']['topic_img']['savepath'], 2) . $result['message']['topic_img']['savename'];
} else {
if (!empty($_POST['url'])) {
/* 来自互联网图片 不可以是服务器地址 */
if (strstr(I('post.url'), 'http') && !strstr(I('post.url'), $_SERVER['SERVER_NAME'])) {
/* 取互联网图片至本地 */
$topic_img = get_url_image(I('post.url'));
} else {
sys_msg(L('web_url_no'));
}
}
}
$data['topic_img'] = empty($topic_img) ? I('post.img_url') : $topic_img;
$htmls = '';
break;
case '2':
$htmls = I('post.content');
$data['topic_img'] = '';
break;
}
// 标题图上传
if ($_FILES['title_pic']['name'] && $_FILES['title_pic']['size'] > 0) {
$result = $this->ectouchUpload('title_pic', 'topic_image');
if ($result['error'] > 0) {
$this->message($result['message'], NULL, 'error');
}
/* 生成logo链接 */
$data['title_pic'] = substr($result['message']['title_pic']['savepath'], 2) . $result['message']['title_pic']['savename'];
} else {
if (!empty($_REQUEST['title_url'])) {
/* 来自互联网图片 不可以是服务器地址 */
if (strstr(I('post.title_url'), 'http') && !strstr(I('post.title_url'), $_SERVER['SERVER_NAME'])) {
/* 取互联网图片至本地 */
$data['title_pic'] = get_url_image(I('post.title_url'));
} else {
sys_msg(L('web_url_no'));
}
}
}
unset($target);
$data['title'] = I('post.topic_name');
$title_pic = empty($data['title_pic']) ? I('post.title_img_url') : $data['title_pic'];
$data['template'] = I('post.topic_template_file') ? I('post.topic_template_file') : '';
$data['start_time'] = local_strtotime(I('post.start_time'));
$data['end_time'] = local_strtotime(I('post.end_time'));
$json = new EcsJson();
$tmp_data = $json->decode($_POST['topic_data']);
$data['data'] = serialize($tmp_data);
$data['intro'] = I('post.topic_intro');
$this->model->table('touch_topic')->data($data)->where('topic_id =' . $id)->update();
$this->message(L('succed'), url('index'));
}
/* 模板赋值 */
$topic = $this->model->table('touch_topic')->field('*')->where('topic_id =' . $id)->find();
$topic['start_time'] = local_date('Y-m-d', $topic['start_time']);
$topic['end_time'] = local_date('Y-m-d', $topic['end_time']);
$topic['topic_intro'] = html_out($topic['intro']);
$topic['intro'] = html_out($topic['intro']);
$json = new EcsJson();
if ($topic['data']) {
$topic['data'] = addcslashes($topic['data'], "'");
$topic['data'] = $json->encode(@unserialize($topic['data']));
$topic['data'] = addcslashes($topic['data'], "'");
}
if (empty($topic['topic_img']) && empty($topic['htmls'])) {
$topic['topic_type'] = 0;
} elseif ($topic['htmls'] != '') {
$topic['topic_type'] = 2;
} elseif (preg_match('/.swf$/i', $topic['topic_img'])) {
$topic['topic_type'] = 1;
} else {
$topic['topic_type'] = '';
//.........这里部分代码省略.........
示例4: date
}
//有上传
$name = date('Ymd');
for ($i = 0; $i < 6; $i++) {
$name .= chr(mt_rand(97, 122));
}
$name .= '.' . end(explode('.', $_FILES['img_file_src']['name']));
$target = ROOT_PATH . DATA_DIR . '/afficheimg/' . $name;
if (move_upload_file($_FILES['img_file_src']['tmp_name'], $target)) {
$src = DATA_DIR . '/afficheimg/' . $name;
}
} else {
if (!empty($_POST['img_src'])) {
$src = $_POST['img_src'];
if (strstr($src, 'http') && !strstr($src, $_SERVER['SERVER_NAME'])) {
$src = get_url_image($src);
}
} else {
$links[] = array('text' => $_LANG['return_edit'], 'href' => 'flashplay.php?act=edit&id=' . $id);
sys_msg($_LANG['src_empty'], 0, $links);
}
}
if (strpos($rt['src'], 'http') === false && $rt['src'] != $src) {
@unlink(ROOT_PATH . $rt['src']);
}
$flashdb[$id] = array('src' => $src, 'url' => $_POST['img_url'], 'text' => $_POST['img_text']);
put_flash_xml($flashdb);
set_flash_data($_CFG['flash_theme'], $error_msg = '');
$links[] = array('text' => $_LANG['go_url'], 'href' => 'flashplay.php?act=list');
sys_msg($_LANG['edit_ok'], 0, $links);
}
示例5: date
/* 处理 */
$name = date('Ymd');
for ($i = 0; $i < 6; $i++) {
$name .= chr(mt_rand(97, 122));
}
$name .= '.' . end(explode('.', $ad_img['ad_img']['name']));
$target = ROOT_PATH . DATA_DIR . '/afficheimg/' . $name;
if (move_upload_file($ad_img['ad_img']['tmp_name'], $target)) {
$src = DATA_DIR . '/afficheimg/' . $name;
}
} else {
if (!empty($filter['content']['url'])) {
/* 来自互联网图片 不可以是服务器地址 */
if (strstr($filter['content']['url'], 'http') && !strstr($filter['content']['url'], $_SERVER['SERVER_NAME'])) {
/* 取互联网图片至本地 */
$src = get_url_image($filter['content']['url']);
} else {
sys_msg($_LANG['web_url_no']);
}
}
}
/* 入库 */
switch ($filter['ad']['ad_type']) {
case '0':
case '1':
$filter['content'] = !is_file(ROOT_PATH . $src) && trim($src) == '' ? $ad_info['content'] : $src;
break;
case '2':
case '3':
$filter['content'] = $filter['content']['htmls'];
break;
示例6: get_url_image_pengajar
/**
* Method untuk mendapatkan link foto pengajar
*
* @param string $img
* @param string $size
* @param string $jk
* @return string url
*/
function get_url_image_pengajar($img = '', $size = 'medium', $jk = 'Laki-laki')
{
if (is_null($img) or empty($img)) {
if ($jk == 'Laki-laki') {
$img = 'default_pl.png';
} else {
$img = 'default_pp.png';
}
return get_url_image($img);
} else {
return get_url_image($img, $size);
}
}
示例7: block_content
public function block_content($context, array $blocks = array())
{
// line 8
echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Pengaturan</h3>\n </div>\n <div class=\"module-body\">\n ";
// line 13
echo get_flashdata("pengaturan");
echo "\n\n ";
// line 15
if (is_demo_app()) {
// line 16
echo " ";
echo get_alert("warning", get_demo_msg());
echo "\n ";
}
// line 18
echo "\n ";
// line 19
echo form_open_multipart("welcome/pengaturan", array("class" => "form-horizontal row-fluid"));
echo "\n <div class=\"control-group\">\n <label class=\"control-label\">Nama sekolah <span class=\"text-error\">*</span></label>\n <div class=\"controls\">\n <input type=\"text\" name=\"nama-sekolah\" class=\"span8\" value=\"";
// line 23
echo twig_escape_filter($this->env, set_value("nama-sekolah", get_pengaturan("nama-sekolah", "value")), "html", null, true);
echo "\">\n <br>";
// line 24
echo form_error("nama-sekolah");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Alamat sekolah <span class=\"text-error\">*</span></label>\n <div class=\"controls\">\n <input type=\"text\" name=\"alamat\" class=\"span8\" value=\"";
// line 30
echo twig_escape_filter($this->env, set_value("alamat", get_pengaturan("alamat", "value")), "html", null, true);
echo "\">\n <br>";
// line 31
echo form_error("alamat");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Telpon</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"telp\" class=\"span5\" value=\"";
// line 37
echo twig_escape_filter($this->env, set_value("telp", get_pengaturan("telp", "value")), "html", null, true);
echo "\">\n <br>";
// line 38
echo form_error("telp");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Registrasi siswa</label>\n <div class=\"controls\">\n <label class=\"radio inline\">\n <input type=\"radio\" name=\"registrasi-siswa\" value=\"1\" ";
// line 45
echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "1", get_pengaturan("registrasi-siswa", "value") == "1" ? true : ""), "html", null, true);
echo "> Tampilkan\n </label>\n <label class=\"radio inline\">\n <input type=\"radio\" name=\"registrasi-siswa\" value=\"0\" ";
// line 48
echo twig_escape_filter($this->env, set_radio("registrasi-siswa", "0", get_pengaturan("registrasi-siswa", "value") == "0" ? true : ""), "html", null, true);
echo "> Sembunyikan\n </label>\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Registrasi pengajar</label>\n <div class=\"controls\">\n <label class=\"radio inline\">\n <input type=\"radio\" name=\"registrasi-pengajar\" value=\"1\" ";
// line 56
echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "1", get_pengaturan("registrasi-pengajar", "value") == "1" ? true : ""), "html", null, true);
echo "> Tampilkan\n </label>\n <label class=\"radio inline\">\n <input type=\"radio\" name=\"registrasi-pengajar\" value=\"0\" ";
// line 59
echo twig_escape_filter($this->env, set_radio("registrasi-pengajar", "0", get_pengaturan("registrasi-pengajar", "value") == "0" ? true : ""), "html", null, true);
echo "> Sembunyikan\n </label>\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Info Registrasi</label>\n <div class=\"controls\">\n <textarea name=\"info-registrasi\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
// line 66
echo set_value("info-registrasi", get_pengaturan("info-registrasi", "value"));
echo "</textarea>\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Peraturan E-learning</label>\n <div class=\"controls\">\n <textarea name=\"peraturan-elearning\" class=\"tinymce\" style=\"width:100%; height:300px;\">";
// line 72
echo set_value("peraturan-elearning", get_pengaturan("peraturan-elearning", "value"));
echo "</textarea>\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Email server</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"email-server\" class=\"span5\" value=\"";
// line 78
echo twig_escape_filter($this->env, set_value("email-server", get_pengaturan("email-server", "value")), "html", null, true);
echo "\">\n <br>";
// line 79
echo form_error("email-server");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">SMTP host</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"smtp-host\" class=\"span5\" value=\"";
// line 85
echo twig_escape_filter($this->env, set_value("smtp-host", get_pengaturan("smtp-host", "value")), "html", null, true);
echo "\">\n <br>";
// line 86
echo form_error("smtp-host");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">SMTP username</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"smtp-username\" class=\"span5\" value=\"";
// line 92
echo twig_escape_filter($this->env, set_value("smtp-username", get_pengaturan("smtp-username", "value")), "html", null, true);
echo "\">\n <br>";
// line 93
echo form_error("smtp-username");
echo "\n </div>\n </div>\n ";
// line 96
if (is_demo_app() == false) {
// line 97
echo " <div class=\"control-group\">\n <label class=\"control-label\">SMTP password</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"smtp-pass\" class=\"span5\" value=\"";
// line 100
echo twig_escape_filter($this->env, set_value("smtp-pass", get_pengaturan("smtp-pass", "value")), "html", null, true);
echo "\">\n <br>";
// line 101
echo form_error("smtp-pass");
echo "\n </div>\n </div>\n ";
}
// line 105
echo " <div class=\"control-group\">\n <label class=\"control-label\">SMTP port</label>\n <div class=\"controls\">\n <input type=\"text\" name=\"smtp-port\" class=\"span5\" value=\"";
// line 108
echo twig_escape_filter($this->env, set_value("smtp-port", get_pengaturan("smtp-port", "value")), "html", null, true);
echo "\">\n <br>";
// line 109
echo form_error("smtp-port");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <label class=\"control-label\">Slider halaman login</label>\n <div class=\"controls\" style=\"background-color: #FBFBFB; padding: 10px;border-radius: 5px;\">\n <table class=\"table table-condensed\">\n <tr>\n <td style=\"border-top: none;\">\n <div class=\"row-fluid\">\n <div class=\"span2\" style=\"margin-bottom: 10px;\">\n Gambar 1\n </div>\n <div class=\"span10\">\n ";
// line 123
if (get_pengaturan("img-slide-1", "value")) {
// line 124
echo " <a href=\"";
echo twig_escape_filter($this->env, site_url("welcome/pengaturan/?delete-img=1"), "html", null, true);
echo "\" class=\"pull-right\" title=\"Hapus gambar\"><i class=\"icon-trash\"></i></a>\n <img src=\"";
// line 125
echo twig_escape_filter($this->env, get_url_image(get_pengaturan("img-slide-1", "value")), "html", null, true);
//.........这里部分代码省略.........
开发者ID:Raniratna,项目名称:new_elearning,代码行数:101,代码来源:7c6785edc4eca16ab1544d48104c49727a1d4b532f8759711570632a9508.php
示例8: block_content
public function block_content($context, array $blocks = array())
{
// line 8
echo "<div class=\"row\">\n ";
// line 9
if (!twig_test_empty(isset($context["sliders"]) ? $context["sliders"] : null)) {
// line 10
echo " <div class=\"span5 offset1\">\n <div class=\"slider-wrapper theme-light\">\n <div id=\"slider-login\" class=\"nivoSlider\">\n ";
// line 13
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["sliders"]) ? $context["sliders"] : null);
foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
// line 14
echo " <img src=\"";
echo twig_escape_filter($this->env, get_url_image($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "value")), "html", null, true);
echo "\" data-thumb=\"";
echo twig_escape_filter($this->env, get_url_image($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "value")), "html", null, true);
echo "\" title=\"#html";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id"), "html", null, true);
echo "\">\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " </div>\n ";
// line 17
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["sliders"]) ? $context["sliders"] : null);
foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
// line 18
echo " <div id=\"html";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id"), "html", null, true);
echo "\" class=\"nivo-html-caption\">\n ";
// line 19
echo $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "title");
echo "\n </div>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo " </div>\n </div>\n ";
}
// line 25
echo "\n <div class=\"module span4 ";
// line 26
echo twig_test_empty(isset($context["sliders"]) ? $context["sliders"] : null) ? "offset4" : "";
echo "\">\n ";
// line 27
echo form_open("login", array("autocomplete" => "off", "class" => "form-vertical"));
echo "\n <div class=\"module-head\">\n <h3>Login E-learning</h3>\n </div>\n <div class=\"module-body\">\n ";
// line 32
echo get_flashdata("login");
echo "\n <div class=\"control-group\">\n <div class=\"controls row-fluid\">\n <input class=\"span12\" name=\"email\" type=\"text\" placeholder=\"Username (Email)\" value=\"";
// line 35
echo twig_escape_filter($this->env, set_value("email"), "html", null, true);
echo "\" autofocus>\n ";
// line 36
echo form_error("email");
echo "\n </div>\n </div>\n <div class=\"control-group\">\n <div class=\"controls row-fluid\">\n <input class=\"span12\" name=\"password\" type=\"password\" placeholder=\"Password\">\n </div>\n </div>\n </div>\n <div class=\"module-foot\">\n <div class=\"control-group\">\n <div class=\"controls clearfix\">\n <button type=\"submit\" class=\"btn btn-large btn-primary pull-right\">Login</button>\n <a href=\"";
// line 49
echo twig_escape_filter($this->env, site_url("login/lupa_password"), "html", null, true);
echo "\">Lupa password?</a>\n </div>\n </div>\n </div>\n ";
// line 53
echo isset($context["form_close"]) ? $context["form_close"] : null;
echo "\n </div>\n</div>\n";
}
开发者ID:Raniratna,项目名称:new_elearning,代码行数:68,代码来源:eef9aa7bfae7e5cc9b05d66f92e31f6a48ce6d3a2309af6693d720333a94.php