• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getImages函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getImages函数的典型用法代码示例。如果您正苦于以下问题:PHP getImages函数的具体用法?PHP getImages怎么用?PHP getImages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: __construct

 public function __construct($tid)
 {
     $this->id = $tid;
     $result = DB::table('templomok')->join('terkep_geocode as geo', 'geo.tid', '=', 'templomok.id', 'left')->join('varosok', 'varosok.nev', '=', 'templomok.varos', 'left')->select('templomok.*', 'geo.lat', 'geo.lng', 'geo.checked', 'geo.address2', 'varosok.irsz')->where('templomok.id', "=", $this->id)->limit(1)->get();
     if (!count($result)) {
         throw new Exception("There is no church with tid = '{$this->id}'.");
     }
     if ($result[0]->letrehozta != '') {
         $this->responsible = array($result[0]->letrehozta);
     } else {
         $this->responsible = array();
     }
     $acceptedColumns = array('nev', 'ismertnev', 'leiras', 'megjegyzes', 'adminmegj', 'miseaktiv', 'misemegj', 'bucsu', 'frissites', 'eszrevetel', 'kontakt', 'kontaktmail', 'letrehozta', 'megbizhato', 'regdatum', 'modositotta', 'moddatum', 'ok');
     foreach ($acceptedColumns as $column) {
         $this->{$column} = $result[0]->{$column};
     }
     $this->getFullName();
     global $user;
     if (!$this->checkPrivilegeRead($user)) {
         throw new Exception("Read access denied to church tid = '{$tid}'");
     }
     $this->getOSM();
     $this->getLocation();
     $this->getReligious_administration();
     $this->kepek = getImages($this->id);
 }
开发者ID:kolesar-andras,项目名称:miserend.hu,代码行数:26,代码来源:Church.php


示例2: getList

function getList($limit = 0)
{
    $data = [];
    for ($i = 0; $i < $limit; $i++) {
        $title = 'Product name ' . $i;
        $data[] = ['title' => $title, 'sku' => 'j' . rand(1000, 9999) . '-' . rand(1000, 9999), 'price' => round(rand(1000, 9999), 2), 'currency' => '$', 'discount' => rand(10, 70), 'code' => base64_encode('product' . time()), 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'meta_keys' => strtolower('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), 'meta_desc' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'images' => getImages($title, rand(2, 9))];
    }
    return $data;
}
开发者ID:artpro676,项目名称:happysocks,代码行数:9,代码来源:products.php


示例3: getAlbums

/**
 * Get all albums (directories) and underlying images.
 * @param string $folder  path to directory to read
 * @return array          array containing album data
 */
function getAlbums($folder)
{
    $albums = array();
    if ($handle = opendir($folder)) {
        while (false !== ($file = readdir($handle))) {
            $path = $folder . $file;
            if (is_dir($path) && $file != '..' && $file != '.') {
                $images = getImages($path . '/');
                $albums[$file] = array('name' => ucfirst(substr($file, 2)), 'link' => $path, 'images' => $images, 'size' => count($images));
            }
        }
        closedir($handle);
    }
    ksort($albums);
    return $albums;
}
开发者ID:benct,项目名称:web-gallery,代码行数:21,代码来源:func.php


示例4: getfiches

<?php

include 'controller.php';
$wc = getfiches(1);
echo "<pre>";
print_r($wc);
echo "</pre>";
$wc = getImages(80);
echo "<pre>";
print_r($wc);
echo "</pre>";
echo "<pre>";
print_r(lambert93ToWgs84('352914.52', '6785627.76'));
echo "</pre>";
开发者ID:HandiPressante,项目名称:HandiPressante-server,代码行数:14,代码来源:index.php


示例5: isset

            break;
        case 'rotate':
            $imageSrc = isset($_REQUEST["image"]) ? $_REQUEST["image"] : '';
            print_r(json_encode(rotateImage($imagesPath, $imagesThumbsPath, $imagesUrl, $imageSrc)));
            break;
        case 'resize':
            $width = isset($_REQUEST["width"]) ? intval($_REQUEST["width"]) : 0;
            $height = isset($_REQUEST["height"]) ? intval($_REQUEST["height"]) : 0;
            $imageSrc = isset($_REQUEST["image"]) ? $_REQUEST["image"] : '';
            print_r(json_encode(resizeImage($imagesPath, $imagesThumbsPath, $imagesUrl, $imageSrc, $width, $height)));
            break;
        case 'imagesList':
            $limit = isset($_REQUEST["limit"]) ? intval($_REQUEST["limit"]) : 10;
            $start = isset($_REQUEST["start"]) ? intval($_REQUEST["start"]) : 0;
            $query = isset($_REQUEST["query"]) ? $_REQUEST["query"] : 0;
            print_r(json_encode(getImages($imagesPath, $imagesUrl, $imagesTumbsUrl, $imagesThumbsPath, $allowedFormats, $start, $limit, $query)));
            break;
        case 'delete':
            $image = isset($_REQUEST["image"]) ? stripslashes($_REQUEST["image"]) : "";
            print_r(json_encode(deleteImage($imagesPath, $imagesThumbsPath, $image)));
            break;
    }
}
function checkAllowedFormats($imageName, $allowedFormats)
{
    // quitamos caracteres extraños
    $imageName = preg_replace('/[^(\\x20-\\x7F)]*/', '', $imageName);
    // extensión del archivo
    $ext = strtolower(substr($imageName, strpos($imageName, '.') + 1, strlen($imageName) - 1));
    if (!in_array($ext, explode(',', $allowedFormats))) {
        return false;
开发者ID:Jaybear,项目名称:HtmlEditorImageUpload,代码行数:31,代码来源:htmlEditorImageUpload.php


示例6: showTimeTable

function showTimeTable($links)
{
    global $mode, $viewmode, $user;
    if ($links == 1) {
        $imageid = getContinuationVar('imageid');
        $length = getContinuationVar('length');
        $requestid = getContinuationVar('requestid', 0);
        $showmessage = getContinuationVar('showmessage', 0);
        $platforms = array();
        $schedules = array();
    } else {
        $imageid = 0;
        $length = 0;
        $requestid = 0;
        $showmessage = 0;
        $platforms = getContinuationVar("platforms");
        if (empty($platforms)) {
            $platforms = processInputVar("platforms", ARG_MULTINUMERIC);
        }
        $schedules = getContinuationVar("schedules");
        if (empty($schedules)) {
            $schedules = processInputVar("schedules", ARG_MULTINUMERIC);
        }
    }
    $argstart = getContinuationVar("start");
    $argend = getContinuationVar("end");
    $resources = getUserResources(array("computerAdmin"));
    $userCompIDs = array_keys($resources["computer"]);
    $computerData = getComputers();
    $imageData = getImages();
    $now = time();
    if ($links) {
        $resources = getUserResources(array("imageAdmin", "imageCheckOut"));
        $usercomputerids = array_keys($resources["computer"]);
        # get list of computers' platformids
        $qh = doQuery("SELECT platformid FROM image WHERE id = {$imageid}", 110);
        $row = mysql_fetch_row($qh);
        $platformid = $row[0];
        $computer_platformids = array();
        $qh = doQuery("SELECT id, platformid FROM computer", 111);
        while ($row = mysql_fetch_row($qh)) {
            $computer_platformids[$row[0]] = $row[1];
        }
        $mappedcomputers = getMappedResources($imageid, "image", "computer");
        $compidlist = array_intersect($mappedcomputers, $usercomputerids);
    } else {
        $compidlist = $userCompIDs;
    }
    if (!empty($argstart) && !empty($argend)) {
        $timeslots = getTimeSlots($compidlist, $argend, $argstart);
        $start = $argstart;
        $end = $argend;
    } else {
        $start = $now;
        $end = $start + SECINDAY / 2;
        $timeslots = getTimeSlots($compidlist, $end);
    }
    print "<DIV align=center>\n";
    print "<H2>Time Table</H2>\n";
    print "</DIV>\n";
    $computeridrow = "";
    $displayedids = array();
    $computers = array_keys($timeslots);
    if ($links) {
        $computers = array_intersect($computers, $usercomputerids);
    }
    foreach ($computers as $id) {
        if ($links) {
            # don't show computers that don't meet hardware criteria, are not
            # in the available state, are the wrong platform, or wrong group,
            # or aren't mapped in resourcemap
            if ($computer_platformids[$id] != $platformid || $computerData[$id]["stateid"] != 2 && $computerData[$id]["stateid"] != 3 && $computerData[$id]["stateid"] != 6 && $computerData[$id]["stateid"] != 8 || $computerData[$id]["ram"] < $imageData[$imageid]["minram"] || $computerData[$id]["procnumber"] < $imageData[$imageid]["minprocnumber"] || $computerData[$id]["procspeed"] < $imageData[$imageid]["minprocspeed"] || $computerData[$id]["network"] < $imageData[$imageid]["minnetwork"] || !in_array($id, $mappedcomputers)) {
                continue;
            }
        } elseif (!array_key_exists($id, $computerData) || !in_array($computerData[$id]["platformid"], $platforms) || !in_array($computerData[$id]["scheduleid"], $schedules) || !in_array($id, $userCompIDs)) {
            continue;
        }
        $computeridrow .= "          <TH>{$id}</TH>\n";
        array_push($displayedids, $id);
    }
    if (empty($displayedids)) {
        if ($links) {
            print "There are currently no computers available that can run the application you selected.\n";
        } else {
            print "There are no computers that meet the specified criteria\n";
        }
        return;
    }
    if ($showmessage) {
        print "The time you have requested to use the environment is not ";
        print "available. You may select from the green blocks of time to ";
        print "select an available time slot to make a reservation.<br>\n";
    }
    print "<table summary=\"\">\n";
    print "  <TR>\n";
    print "    <TD>";
    # print Previous/Next links
    if (!empty($argstart) && $argstart - SECINDAY / 2 > $now - 600) {
        $prevstart = $start - SECINDAY / 2;
        $prevend = $end - SECINDAY / 2;
//.........这里部分代码省略.........
开发者ID:gw-acadtech,项目名称:VCL,代码行数:101,代码来源:utils.php


示例7: getMappedSubConfigs

function getMappedSubConfigs($mode, $arg1, $arg2, $rec = 0)
{
    # $mode - 0: subimages, 1: subconfigs
    global $user;
    if ($mode == 0) {
        $configsubimageid = $arg1;
        $imageid = $arg2;
        $imgdata = getImages(0, $imageid);
    } else {
        $inlist = implode(',', $arg1);
        $searchid = $arg2;
    }
    $query = "SELECT cm.id, " . "cmt.prettyname AS configmaptype, " . "c.id AS configid, " . "c.name AS config, " . "c.data AS configdata, " . "c.ownerid, " . "CONCAT(u.unityid, '@', ua.name) AS owner, " . "c.configtypeid, " . "ct.prettyname AS configtype, " . "c.optional, " . "cm.configmaptypeid, " . "cm.subid, " . "cm.affiliationid, " . "a.name AS affiliation, " . "cm.configstageid, " . "cs.name AS configstage, " . "csi.imageid AS subimageid, " . "csi.id AS configsubimageid, " . "cm.disabled " . "FROM configmap cm, " . "config c " . "LEFT JOIN configsubimage csi ON (c.id = csi.configid), " . "user u, " . "affiliation ua, " . "configtype ct, " . "configmaptype cmt, " . "affiliation a, " . "configstage cs " . "WHERE cm.configid = c.id AND " . "c.ownerid = u.id AND " . "u.affiliationid = ua.id AND " . "c.configtypeid = ct.id AND " . "cm.configmaptypeid = cmt.id AND " . "cm.affiliationid = a.id AND " . "(cm.affiliationid = {$user['affiliationid']} OR " . "a.name = 'Global') AND " . "cm.configstageid = cs.id AND ";
    if ($mode) {
        $query .= "cmt.name = 'config' AND " . " cm.subid IN ({$inlist})";
    } else {
        $query .= "((cmt.name = 'configsubimage' AND " . "  cm.subid = {$configsubimageid}) OR " . " (cmt.name = 'OStype' AND " . "  cm.subid = {$imgdata[$imageid]['ostypeid']}) OR " . " (cmt.name = 'OS' AND " . "  cm.subid = {$imgdata[$imageid]['osid']}))";
    }
    $qh = doQuery($query);
    $configs = array();
    $configids = array();
    while ($row = mysql_fetch_assoc($qh)) {
        $row['configmapid'] = $row['id'];
        if (is_null($row['subimageid'])) {
            $configids[] = $row['configid'];
        }
        if ($row['configtype'] == 'Cluster') {
            $row['id'] = "{$row['id']}-{$row['configsubimageid']}";
            $row['cluster'] = 1;
        } else {
            $row['cluster'] = 0;
        }
        $row['configdata'] = htmlspecialchars($row['configdata']);
        $row['optional'] = (int) $row['optional'];
        $row['applied'] = true;
        $row['disabled'] = (int) $row['disabled'];
        if ($mode == 0) {
            $row['id'] = "{$configsubimageid}/{$row['id']}";
        } else {
            $row['id'] = "{$searchid}/{$row['id']}";
        }
        $configs[$row['id']] = $row;
        if ($rec < 20 && $row['configtype'] == 'Cluster') {
            $subconfigs = getMappedSubConfigs(0, $row['configsubimageid'], $row['subimageid'], ++$rec);
            $configs = $configs + $subconfigs;
        }
    }
    if ($rec < 20 && !empty($configids)) {
        if ($mode == 0) {
            $subconfigs = getMappedSubConfigs(1, $configids, $configsubimageid, ++$rec);
        } else {
            $subconfigs = getMappedSubConfigs(1, $configids, $searchid, ++$rec);
        }
        $configs = $configs + $subconfigs;
    }
    return $configs;
}
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:57,代码来源:utils.php


示例8: getImages

<?php

include "config.php";
getImages($_GET['id'], $con);
function getImages($id, $con)
{
    $result = mysqli_query($con, "select * from eventphotos where eventid = '{$id}' order by id desc") or die(mysqli_error($con));
    $nara = array();
    while ($y = mysqli_fetch_array($result)) {
        $y['path'] = $_SESSION['serverUrl'] . $y['path'];
        echo $y['path'];
        break;
    }
}
开发者ID:tnr2394,项目名称:rotaract,代码行数:14,代码来源:get_firstphoto.php


示例9: getMapSubName

 function getMapSubName($maptype, $subid)
 {
     switch ($maptype) {
         case "Image":
             $data = getImages(0, $subid);
             return $data[$subid]['prettyname'];
         case "OS Type":
             $ostypes = getOStypes();
             return $ostypes[$subid];
         case "OS":
             $oses = getOSList();
             return $oses[$subid]['prettyname'];
         case "Config":
         case "Cluster":
             $data = $this->_getData($subid);
             return $data[$subid]['name'];
         case "Management Node":
             $managementnodes = getManagementNodes('neither', 0, $subid);
             return $managementnodes[$subid]['hostname'];
             break;
     }
 }
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:22,代码来源:config.php


示例10: cpg_db_fetch_rowset

     //echo "<br> " . $query ;
     $result = cpg_db_fetch_rowset(cpg_db_query($query));
     //echo "result " . $result[0][0];
     if ($result[0][0] != 0) {
         return true;
     } else {
         return false;
     }
 }
 $get = Inspekt::makeGetCage();
 if ($superCage->get->getRAW('check') == 1) {
     securityCheck();
 } else {
     if (verifykey($superCage->get->getRAW('magik'))) {
         if ($superCage->get->getRAW('getalb') == 1) {
             getImages($superCage->get->getRAW('alb'));
         } else {
             if ($superCage->get->getRAW('getroot') == 1) {
                 getroot();
             } else {
                 if ($superCage->get->getRAW('getcat') == 1) {
                     getAlbums($superCage->get->getRAW('cat'));
                 } else {
                     if ($superCage->get->getRAW('albumlisting') == 1) {
                         treeBuilder();
                     } else {
                         if ($superCage->get->getRAW('getimg') == 1) {
                             getimg($superCage->get->getRAW('img'));
                         } else {
                             if ($superCage->get->getRAW('photoinfo') == 1) {
                                 getPhotoInfo($superCage->get->getRAW('photo'));
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:flashmanager.php


示例11: mime_content_type

        $mimetype = mime_content_type("{$fulldir}{$entry}");
        foreach ($imagetypes as $valid_type) {
            if (preg_match("@^{$valid_type}@", $mimetype)) {
                $retval[] = array('file' => "/{$dir}{$entry}", 'size' => getimagesize("{$fulldir}{$entry}"));
                break;
            }
        }
    }
    $d->close();
    sort($retval);
    return $retval;
}
//test compress image
testTypeImage($directoryBIG, $directoryLOW);
// fetch image details
$images = getImages($directoryBIG, $directoryLOW, $dirVillageAttaque);
$n_images = count($images);
// SCRIPTS JS
/*
echo "<script type='text/javascript'>";
echo "function goDraw(){";
echo "var e = document.getElementById('selectBattleLeft');";
echo "var v = e.options[e.selectedIndex].value;";
echo "	alert(v);";
echo "}";
echo "</script>";
// check screen
echo "<script type='text/javascript'>";
echo "var w_img_gdc=' ';";
echo "var w = window.innerWidth;";
echo "var h = window.innerHeight;";
开发者ID:vincseize,项目名称:GDC,代码行数:31,代码来源:gdc.php


示例12: getProductMult

function getProductMult($d, $type, $cat)
{
    global $i, $o, $revs;
    $imgfileurlcache = $d->find('a.product-image[rel=gal1]', 0)->href;
    $imgtitle = $d->find('a.product-image[rel=gal1]', 0)->title;
    $im = explode("/", strstr($imgfileurlcache, "media/"));
    $imgfileurl = strstr($imgfileurlcache, "media/", true) . implode("/", array($im[0], $im[1], $im[2], $im[7], $im[8], $im[9]));
    $imgfile = $im[9];
    $img = implode("/", array($im[7], $im[8], $im[9]));
    fputcsv($i, array($imgfileurl, $img, $imgfileurlcache));
    if (!is_null($d->find('div[itemprop=description]', 0))) {
        $shortdesc = trim($d->find('div[itemprop=description]', 0)->innertext);
    } else {
        $shortdesc = "";
    }
    if (!is_null($d->find('#tab-full-details', 0))) {
        $description = trim($d->find('#tab-full-details', 0)->innertext);
    } else {
        $description = "";
    }
    $brand = "";
    if (count($d->find('table.grouped-items-table > tbody > tr.item')) < 2) {
        $prodsku = trim($d->find('table.grouped-items-table > tbody > tr.item span.sku', 0)->innertext, "SKU: ");
        $prodname = $d->find('table.grouped-items-table > tbody > tr.item div.product-name', 0)->innertext;
        $prodprice = trim($d->find('table.grouped-items-table > tbody > tr.item span.price', 0)->innertext, "\$ ");
        $prodvis = 4;
        $groupedskus = "";
        $prodtype = "simple";
        getGroupedSku($prodsku, $prodtype, $cat, $description, $img, $brand, $prodname, $prodprice, $shortdesc, $prodvis, $imgtitle, $groupedskus);
    } else {
        $groupskus = array();
        foreach ($d->find('table.grouped-items-table > tbody > tr.item') as $item) {
            if (!is_null($item->find('span.sku', 0))) {
                $prodsku = trim($item->find('span.sku', 0)->innertext, "SKU: ");
                $prodname = $item->find('div.product-name', 0)->innertext;
                $prodprice = trim($item->find('span.price', 0)->innertext, "\$ ");
                $prodvis = 1;
                $groupedskus = "";
                $prodtype = "simple";
                $groupskus[] = $prodsku;
                getGroupedSku($prodsku, $prodtype, $cat, $description, $img, $brand, $prodname, $prodprice, $shortdesc, $prodvis, $imgtitle, $groupedskus);
            }
        }
        $prodsku = $groupskus[0] . "g";
        $prodname = $d->find('div[itemprop=name]', 0)->firstChild()->innertext;
        $prodprice = "";
        $prodvis = 4;
        $groupedskus = implode(",", $groupskus);
        $prodtype = "grouped";
        getGroupedSku($prodsku, $prodtype, $cat, $description, $img, $brand, $prodname, $prodprice, $shortdesc, $prodvis, $imgtitle, $groupedskus);
    }
    getImages($d);
    $revs[$prodsku] = 0;
    getReviews($d, $prodsku);
    return 1;
}
开发者ID:jbm160,项目名称:brs,代码行数:56,代码来源:getprod.php


示例13: mysqli_query

<?php

require 'config.php';
$result = mysqli_query($con, "select * from events where achievement=1 order by date desc") or die(mysqli_error($con));
$ara = array();
while ($x = mysqli_fetch_array($result)) {
    $sara = array();
    $sara['id'] = $x['id'];
    $sara['name'] = $x['name'];
    $sara['path'] = getImages($x['id'], $con);
    array_push($ara, $sara);
}
function getImages($id, $con)
{
    $result = mysqli_query($con, "select * from eventphotos where eventid = '{$id}' order by id desc") or die(mysqli_error($con));
    $nara = array();
    while ($y = mysqli_fetch_array($result)) {
        $x = $_SESSION['serverUrl'] . $y['path'];
        return $x;
    }
}
echo json_encode($ara);
开发者ID:tnr2394,项目名称:rotaract,代码行数:22,代码来源:get_achievements.php


示例14: AJaddSubimage

 function AJaddSubimage()
 {
     $imageid = getContinuationVar('imageid');
     $adminids = getContinuationVar('adminids');
     $userimageids = getContinuationVar('userimageids');
     $subimages = getContinuationVar('subimages');
     $imagemetaid = getContinuationVar('imagemetaid');
     if (!in_array($imageid, $adminids)) {
         $arr = array('error' => 'noimageaccess', 'msg' => i("You do not have access to manage this image."));
         sendJSON($arr);
         return;
     }
     $newid = processInputVar('imageid', ARG_NUMERIC);
     if (!in_array($newid, $userimageids)) {
         $arr = array('error' => 'nosubimageaccess', 'msg' => i("You do not have access to add this subimage."));
         sendJSON($arr);
         return;
     }
     if (is_null($imagemetaid)) {
         $query = "INSERT INTO imagemeta " . "(subimages) " . "VALUES (1)";
         doQuery($query, 101);
         $imagemetaid = dbLastInsertID();
         $query = "UPDATE image " . "SET imagemetaid = {$imagemetaid} " . "WHERE id = {$imageid}";
         doQuery($query, 101);
     } elseif (!count($subimages)) {
         $query = "UPDATE imagemeta " . "SET subimages = 1 " . "WHERE id = {$imagemetaid}";
         doQuery($query, 101);
     }
     $query = "INSERT INTO subimages " . "(imagemetaid, " . "imageid) " . "VALUES ({$imagemetaid}, " . "{$newid})";
     doQuery($query, 101);
     $subimages[] = $newid;
     $data = array('imageid' => $imageid, 'adminids' => $adminids, 'imagemetaid' => $imagemetaid, 'userimageids' => $userimageids, 'subimages' => $subimages, 'obj' => $this);
     $addcont = addContinuationsEntry('AJaddSubimage', $data, SECINDAY, 1, 0);
     $remcont = addContinuationsEntry('AJremSubimage', $data, SECINDAY, 1, 0);
     $image = getImages(0, $newid);
     $name = $image[$newid]['prettyname'];
     $arr = array('newid' => $newid, 'name' => $name, 'addcont' => $addcont, 'remcont' => $remcont);
     sendJSON($arr);
 }
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:39,代码来源:image.php


示例15: array

    // array to hold return value
    $retval = array();
    // full server path to directory
    $fulldir = "{$_SERVER['DOCUMENT_ROOT']}{$dir}";
    $d = @dir($fulldir) or die("getImages: Failed opening directory {$dir} for reading");
    while (false !== ($entry = $d->read())) {
        // skip hidden files
        if ($entry[0] == ".") {
            continue;
        }
        // check for image files
        $f = escapeshellarg("{$fulldir}{$entry}");
        $retval[] = array('file' => "/members/images/large/{$entry}", 'size' => getimagesize("{$fulldir}/{$entry}"));
    }
    $d->close();
    return $retval;
}
// fetch image details
$images = getImages("\\members\\images\\large");
// display on page
foreach ($images as $img) {
    echo "<div class=\"photo\">";
    echo "<img src=\"{$img['file']}\" width='200' height='auto' alt=\"\"><br>\n";
    // display image file name as link
    echo "<a href=\"{$img['file']}\">", basename($img['file']), "</a><br>\n";
    // display image dimenstions
    echo "({$img['size'][0]} x {$img['size'][1]} pixels)<br>\n";
    // display mime_type
    echo $img['size']['mime'];
    echo "</div>\n";
}
开发者ID:W3AMD,项目名称:W3OI,代码行数:31,代码来源:testimages.php


示例16: processRequestInput

function processRequestInput($checks = 1)
{
    global $submitErr, $submitErrMsg, $mode;
    $return = array();
    $return["requestid"] = processInputVar("requestid", ARG_NUMERIC);
    $return["day"] = preg_replace('[\\s]', '', processInputVar("day", ARG_STRING));
    $return["hour"] = processInputVar("hour", ARG_NUMERIC);
    $return["minute"] = processInputVar("minute", ARG_STRING);
    $return["meridian"] = processInputVar("meridian", ARG_STRING);
    $return["endday"] = preg_replace('[\\s]', '', processInputVar("endday", ARG_STRING));
    $return["endhour"] = processInputVar("endhour", ARG_NUMERIC);
    $return["endminute"] = processInputVar("endminute", ARG_STRING);
    $return["endmeridian"] = processInputVar("endmeridian", ARG_STRING);
    $return["length"] = processInputVar("length", ARG_NUMERIC);
    $return["started"] = getContinuationVar('started', processInputVar("started", ARG_NUMERIC));
    $return["os"] = processInputVar("os", ARG_STRING);
    $return["imageid"] = getContinuationVar('imageid', processInputVar("imageid", ARG_NUMERIC));
    $return["prettyimage"] = processInputVar("prettyimage", ARG_STRING);
    $return["time"] = processInputVar("time", ARG_STRING);
    $return["revisionid"] = processInputVar("revisionid", ARG_MULTINUMERIC);
    $return["ending"] = processInputVar("ending", ARG_STRING, "length");
    $return["enddate"] = processInputVar("enddate", ARG_STRING);
    $return["extend"] = processInputVar("extend", ARG_NUMERIC);
    $return["testjavascript"] = processInputVar("testjavascript", ARG_NUMERIC, 0);
    $return['lengthchanged'] = 0;
    if ($return["minute"] == 0) {
        $return["minute"] = "00";
    }
    if ($return["endminute"] == 0) {
        $return["endminute"] = "00";
    }
    if (!$checks) {
        return $return;
    }
    if (!$return["started"]) {
        $checkdateArr = explode('/', $return["day"]);
        if (!is_numeric($checkdateArr[0]) || !is_numeric($checkdateArr[1]) || !is_numeric($checkdateArr[2]) || !checkdate($checkdateArr[0], $checkdateArr[1], $checkdateArr[2])) {
            $submitErr |= STARTDAYERR;
            $submitErrMsg[STARTDAYERR] = "The submitted start date is invalid. ";
        }
        if (!ereg('^((0?[1-9])|(1[0-2]))$', $return["hour"], $regs)) {
            $submitErr |= STARTHOURERR;
            $submitErrMsg[STARTHOURERR] = "The submitted hour must be from 1 to 12.";
        }
    }
    # TODO check for valid revisionids for each image
    if (!empty($return["revisionid"])) {
        foreach ($return['revisionid'] as $key => $val) {
            if (!is_numeric($val) || $val < 0) {
                unset($return['revisionid']);
            }
        }
    }
    /*if($mode == "confirmAdminEditRequest") {
    		$checkdateArr = explode('/', $return["endday"]);
    		if(! is_numeric($checkdateArr[0]) ||
    		   ! is_numeric($checkdateArr[1]) ||
    		   ! is_numeric($checkdateArr[2]) ||
    		   ! checkdate($checkdateArr[0], $checkdateArr[1], $checkdateArr[2])) {
    			$submitErr |= ENDDAYERR;
    			$submitErrMsg[ENDDAYERR] = "The submitted end date is invalid. ";
    		}
    		if(! ereg('^((0?[1-9])|(1[0-2]))$', $return["endhour"])) {
    			$submitErr |= ENDHOURERR;
    			$submitErrMsg[ENDHOURERR] = "The submitted hour must be from 1 to 12.";
    		}
    	}*/
    // make sure user hasn't submitted something longer than their allowed max length
    $imageData = getImages(0, $return['imageid']);
    $maxtimes = getUserMaxTimes();
    if ($maxtimes['initial'] < $return['length']) {
        $return['lengthchanged'] = 1;
        $return['length'] = $maxtimes['initial'];
    }
    if ($imageData[$return['imageid']]['maxinitialtime'] > 0 && $imageData[$return['imageid']]['maxinitialtime'] < $return['length']) {
        $return['lengthchanged'] = 1;
        $return['length'] = $imageData[$return['imageid']]['maxinitialtime'];
    }
    if ($return["ending"] != "length") {
        if (!ereg('^(20[0-9]{2})-([0-1][0-9])-([0-3][0-9]) (([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])$', $return["enddate"], $regs)) {
            $submitErr |= ENDDATEERR;
            $submitErrMsg[ENDDATEERR] = "The submitted date/time is invalid.";
        } elseif (!checkdate($regs[2], $regs[3], $regs[1])) {
            $submitErr |= ENDDATEERR;
            $submitErrMsg[ENDDATEERR] = "The submitted date/time is invalid.";
        }
    }
    if ($return["testjavascript"] != 0 && $return['testjavascript'] != 1) {
        $return["testjavascript"] = 0;
    }
    return $return;
}
开发者ID:gw-acadtech,项目名称:VCL,代码行数:92,代码来源:requests.php


示例17: RESTresourceDetail

function RESTresourceDetail()
{
    $type = validatetype(processRESTarg(1, ARG_STRING));
    $deleted = processInputVar('deleted', ARG_NUMERIC, 0);
    if ($deleted != 0 && $deleted != 1) {
        $deleted = 0;
    }
    $name = processInputVar('name', ARG_STRING, '*');
    $tmp = processInputVar('prettyname', ARG_STRING, '*');
    if ($name == '*' && $tmp != '*') {
        $name = $tmp;
    }
    if (is_null($type)) {
        RESTresponse(404, "invalid resource type");
        return;
    }
    $subid = processRESTarg(2, ARG_NUMERIC, 0);
    if ($type == 'image') {
        $resources = getUserResources(array("imageAdmin", "imageCheckOut"), array('available'), 0, $deleted);
    } elseif ($type == 'computer') {
        $resources = getUserResources(array("computerAdmin"), array("administer"), 0, $deleted);
    } elseif ($type == 'config') {
        $resources = getUserResources(array("configAdmin"), array('available'), 0, $deleted);
    }
    # TODO
    #elseif ...
    if ($subid && !array_key_exists($subid, $resources[$type])) {
        RESTresponse(404, "specified resource does not exist");
        printArray($resources[$type]);
        return;
    }
    if ($_SERVER['REQUEST_METHOD'] == 'DELETE') {
        if (RESTdeleteResource($type, $subid)) {
            RESTresponse(204);
        } else {
            RESTresponse(404, "specified resource does not exist 2");
        }
        return;
    }
    if ($type == 'image') {
        $items = getImages($deleted, $subid);
        $data = array();
        foreach (array_keys($resources[$type]) as $id) {
            if ($name != '*' && !preg_match("/^{$name}\$/i", $items[$id]['prettyname'])) {
                continue;
            }
            if (array_key_exists($id, $items)) {
                $data[$id] = $items[$id];
            }
        }
    } elseif ($type == 'computer') {
        $data = getComputers(1, 0, $subid);
    } elseif ($type == 'config') {
        $cluster = processInputVar('cluster', ARG_NUMERIC, -1);
        $cfg = new Config();
        $items = $cfg->getData($cfg->defaultGetDataArgs);
        $data = array();
        foreach (array_keys($resources[$type]) as $id) {
            if ($name != '*' && !preg_match("/^{$name}\$/i", $items[$id]['name'])) {
                continue;
            }
            if (array_key_exists($id, $items)) {
                if ($cluster == -1 || $cluster == 0 && $items[$id]['configtype'] != 'Cluster' || $cluster == 1 && $items[$id]['configtype'] == 'Cluster') {
                    $data[$id] = $items[$id];
                }
            }
        }
    }
    #elseif ...
    if ($subid == 0) {
        sendREST(dataToJSON($data));
        return;
    }
    sendREST(dataToJSON($data[$subid], 1));
}
开发者ID:bq-xiao,项目名称:apache-vcl,代码行数:75,代码来源:storebackend.php


示例18: getAll

/**
 * Get all photo posts of blog as json
 */
function getAll(){
	global $config;
	
	$client = new Tumblr\API\Client($config['tumblr_consumer_key']);

	$options['limit'] = 50;
	$options['type'] = "photo";
	$options['filter'] = "text";

	$config['post_limit'] = $options['limit'];

	$total = getTotalPosts($client, $config['blog'], $options);
	$response["images"] = array();

	for ($i=0; $i < ceil($total / $options['limit']); $i++) { 
		$data = getImages($i);

		$response['images'] = array_merge($response['images'], $data['images']);
	}


	$onlyUrl = isset($_REQUEST['onlyUrl']); 

	if ($onlyUrl) {
		foreach ($response['images'] as $image) {
			echo $image['src'] . "\r\n";
		}
		die;
	} else {
		die(json_encode($response));
	}
}
开发者ID:Kakajann,项目名称:imgf,代码行数:35,代码来源:functions.php


示例19: getImages

    echo $video;
    ?>
"/>
                    <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web
                        browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5
                            video</a></p>
                </video>

            </div>

        <?php 
}
?>

        <?php 
$images = getImages($id);
if (!empty($images)) {
    ?>
            <div class="project-images" style="float: none; width: initial;">
                <?php 
    foreach ($images as $image) {
        echo '<img src="' . SITE_URL . '/uploads/images/' . $image['file_name'] . '" alt="">';
    }
    ?>
            </div>
        <?php 
}
?>
    </div>

</div>
开发者ID:aryalprakash,项目名称:rroute,代码行数:31,代码来源:project_details.php


示例20: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // Notendur
     \App\User::create(['name' => 'Netvistun', 'email' => '[email protected]', 'password' => bcrypt(env('NETVISTUN')), 'remember_token' => str_random(10)]);
     $faker = Faker\Factory::create();
     function makePage($page = [])
     {
         $page['slug'] = isset($page['slug']) ? $page['slug'] : str_slug($page['title']);
         $page['images'] = isset($page['images']) ? $page['images'] : [];
         return factory(\App\Page::class)->create($page);
     }
     function makeProduct($page = [])
     {
         $page['slug'] = isset($page['slug']) ? $page['slug'] : str_slug($page['title']);
         $page['images'] = isset($page['images']) ? $page['images'] : [];
         return factory(\App\Product::class)->create($page);
     }
     function makeCategory($page = [])
     {
         $page['slug'] = isset($page['slug']) ? $page['slug'] : str_slug($page['title']);
         $page['images'] = isset($page['images']) ? $page['images'] : [];
         return factory(\App\Category::class)->create($page);
     }
     $pages = ['Sagan', 'Vörur', 'Hafa samba 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getImagesPath函数代码示例发布时间:2022-05-15
下一篇:
PHP getImageUrlByAttachId函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap