Ejemplo n.º 1
0
 /**
  * @desc 文本自动回复
  * @return string
  */
 public function text()
 {
     $keyword = trim($this->_postObj->Content);
     switch ($keyword) {
         case '':
             echo text($this->_postObj, '你什么意思?');
             break;
         case '你好!':
             echo text($this->_postObj, '你好呀!');
             break;
         case 'hello':
             echo text($this->_postObj, 'Hi!!');
             break;
         case 'Hi':
             echo text($this->_postObj, 'Oh!');
             break;
         case '换行':
             echo text($this->_postObj, '这是第一行!' . "\n" . '我是第二行!');
             break;
         case '多图文':
             $array = [['Title' => '多图文一', 'Description' => '第一个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/1455679468779.jpg', 'Url' => 'http://www.goto318.com'], ['Title' => '多图文二', 'Description' => '第二个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/10.jpg', 'Url' => 'http://www.goto318.com']];
             echo images($this->_postObj, $array);
         default:
             echo text($this->_postObj, '/::)');
             break;
     }
 }
Ejemplo n.º 2
0
function fetchAllImages()
{
    $pdo = databaseConnection();
    $sql = "SELECT Path, TravelImage.ImageID, Title\n" . "FROM `TravelImage`\n" . "INNER JOIN TravelImageDetails\n" . "ON TravelImage.ImageID = TravelImageDetails.ImageID";
    $result = $pdo->query($sql);
    images($result);
    $pdo = null;
}
Ejemplo n.º 3
0
/**
 * Setup image menu
 * 
 * @param string         $hook   "register"
 * @param string         $type   "menu:entity"
 * @param ElggMenuItem[] $return Menu
 * @param array          $params Hook params
 * @return ElggMenuItem[]
 */
function images_ui_setup_entity_menu($hook, $type, $return, $params)
{
    $entity = elgg_extract('entity', $params);
    if (!images()->isImage($entity)) {
        return;
    }
    if ($entity->canEdit()) {
        $return[] = ElggMenuItem::factory(['name' => 'edit', 'text' => elgg_echo('edit'), 'title' => elgg_echo('edit:this'), 'href' => "/images/edit/{$entity->guid}", 'priority' => 200]);
        $return[] = ElggMenuItem::factory(['name' => 'delete', 'text' => elgg_view_icon('delete'), 'title' => elgg_echo('delete:this'), 'href' => "/action/entity/delete?guid={$entity->guid}", 'confirm' => elgg_echo('deleteconfirm'), 'priority' => 300]);
    }
    return $return;
}
Ejemplo n.º 4
0
function ImageUrl($relPath)
{
    $relPath = str_replace('\\', '/', $relPath);
    if (strpos($relPath, '/') === 0) {
        $relPath = substr($relPath, 1);
    }
    if (is_file(FCPATH . DIRECTORY_SEPARATOR . $relPath) && file_exists(FCPATH . DIRECTORY_SEPARATOR . $relPath)) {
        return base_url() . $relPath;
    } else {
        return images() . 'no.gif';
    }
}
Ejemplo n.º 5
0
/**
 * User avatar icon URL handler
 *
 * @param string $hook   "entity:icon:url"
 * @param string $type   "object"
 * @param string $return URL
 * @param array  $params Hook params
 * @return array
 */
function avatars_user_icon_url($hook, $type, $return, $params)
{
    $entity = elgg_extract('entity', $params);
    $size = elgg_extract('size', $params);
    $avatar = avatars_get_avatar($entity);
    if (!$avatar) {
        return;
    }
    $thumb = images()->getThumb($avatar, $size);
    if (!$thumb) {
        return;
    }
    return elgg_get_inline_url($thumb, false);
}
Ejemplo n.º 6
0
/**
 * Create an avatar from a file resource
 * 
 * @param ElggEntity $entity Entity to which avatar will belong
 * @param type       $path   Path to file
 * @return Avatar|false
 */
function avatars_create_aavatar_from_resource(ElggEntity $entity, $path)
{
    avatars_clear_avatars($entity);
    $basename = pathinfo($path, PATHINFO_BASENAME);
    $avatar = new Avatar();
    $avatar->owner_guid = $entity instanceof ElggUser ? $entity->guid : $entity->owner_guid;
    $avatar->container_guid = $entity->guid;
    $avatar->access_id = $entity->access_id;
    $avatar->setFilename("avatars/{$entity->guid}/" . time() . $basename);
    $avatar = images()->createFromResource($path, $avatar);
    if ($avatar && $avatar->save()) {
        $entity->avatar_last_modified = $avatar->time_created;
    }
    return $avatar;
}
Ejemplo n.º 7
0
                   <div id="myCarouselMini" class="carousel slide" data-ride="carousel">
					  <!-- Indicators -->
					  <ol class="carousel-indicators">
					    <li data-target="#myCarouselMini" data-slide-to="0" class="active"></li>
					    <li data-target="#myCarouselMini" data-slide-to="1"></li>
					    <li data-target="#myCarouselMini" data-slide-to="2"></li>
					    <li data-target="#myCarouselMini" data-slide-to="3"></li>
					    <li data-target="#myCarouselMini" data-slide-to="4"></li>
					  </ol>
					
					  <!-- Wrapper for slides -->
					  <div class="carousel-inner" role="listbox" style="height: 370px;width:295px;">
					  <?php 
for ($i = 0; $i < 5; $i++) {
    $class = "";
    $imgs_tend = images($oeuvretend, $i);
    $p = pubData($oeuvretend, $i);
    $title = body_title($oeuvretend, $i);
    if ($i == 0) {
        $class = "active";
    }
    echo '<div class="item ' . $class . '">';
    echo '<a href="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($oeuvretend, $i) . '&type=' . Type($oeuvretend, $i) . '"><div class="oeuvre_detail"><strong>&ldquo;' . $p[0] . '&rdquo;</strong><br>' . $title . '</div><br/><img src="' . $imgs_tend[count($imgs_tend) - 1] . '" width="295"/></a>';
    echo '</div>';
}
?>
					  </div>
					
					</div>
                    
Ejemplo n.º 8
0
 /**
  * @param string $hash
  * @param string|null $filterName
  * @return string
  */
 function image($hash, $filterName = null)
 {
     return images()->url($hash, $filterName);
 }
<div class="menu_center">
	<a href="index.php" title="Home" class="menu_txt">Home</a>
	<a href="index.php?id=1" title="Settings" class="menu_txt">Settings</a>
    <a href="index.php?id=2" title="Tiles" class="menu_txt">Tiles</a>
    <a href="index.php?id=3" title="Articles" class="menu_txt">Articles</a>
    <a href="index.php?id=4" title="Message to Users" class="menu_txt">Messages to Users</a>
</div>
<a href="index.php?logout_admin=1" title="Logout" class="logout"></a>				
</div>
<?
$id = addslashes(strip_tags(trim($_GET['id'])));

if(!$id){statistic();}
if($id==1){change_password();}
if($id==2){tails($id);}
if($id==3){articles($id);}
if($id==4){messages($id);}
if($id==9){images($id);}

}
?>
<br /><br />
 
<div class="push"></div>
 
</center>
</div>
<div class="stopka"><? stopka(); ?></div>
</body>
</html>
Ejemplo n.º 10
0
<link rel="icon" type="image/ico" href="<?php 
echo images() . "favicon.png";
?>
"/>
<link rel="stylesheet" href="<?php 
echo css() . "bootstrap.min.css";
?>
">
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<script src="<?php 
echo js() . "jquery.js";
?>
"></script>
<script src="<?php 
echo js() . "myjquery.js";
?>
"></script>
<script src="<?php 
echo js() . "myjs.js";
?>
"></script>
<script src="<?php 
echo js() . "bootstrap.min.js";
?>
" type="text/javascript"></script>
<style>
    h2{
        color: #269abc;
    }
</style>
Ejemplo n.º 11
0
$params = new stdClass();
$input_keys = array_keys((array) elgg_get_config('input'));
$request_keys = array_keys((array) $_REQUEST);
$keys = array_unique(array_merge($input_keys, $request_keys));
foreach ($keys as $key) {
    if ($key) {
        $params->{$key} = get_input($key);
    }
}
$entity = get_entity($params->guid);
if (!images()->isImage($entity)) {
    register_error(elgg_echo('images:error:not_found'));
    forward(REFERRER);
}
if (!$entity->canEdit()) {
    register_error(elgg_echo('images:error:permission_denied'));
    forward(REFERRER);
}
$cropped = images()->crop($entity, $params->crop_coords['x1'], $params->crop_coords['y1'], $params->crop_coords['x2'], $params->crop_coords['y2']);
if ($cropped) {
    // reset cropping coordinates as they no longer represent an area on the original image
    unset($entity->x1);
    unset($entity->y1);
    unset($entity->x2);
    unset($entity->y2);
    system_message(elgg_echo('images:crop:success'));
} else {
    register_error(elgg_echo('images:crop:error'));
}
forward(REFERRER);
Ejemplo n.º 12
0
     module();
     break;
 case 'partenaires':
     module();
     break;
 case 'ajouter':
     anti_slash();
     ajout_news();
     break;
 case 'editer':
     anti_slash();
     editer_news();
     break;
 case 'images':
     formulaire_images();
     images();
     break;
 case 'upload':
     envoyer_images();
     break;
 case 'delete':
     supprimer_images();
     break;
 case 'configuration':
     configuration();
     break;
 case 'listeliens':
     lienslisteadmin();
     break;
 case 'ajouterliens':
     anti_slash();
Ejemplo n.º 13
0
echo "<p>" . $row['CountryDescription'] . "</p>";
?>
        </div>
        
        <div class="panel panel-info">
           <div class="panel-heading">Images From <?php 
echo $row['CountryName'];
?>
</div> 
           <div class="well">
            <div class="row">         
            <?php 
$pdo = databaseConnection();
$sql = "SELECT TravelImage.ImageID, Path, CountryCodeISO, Title FROM TravelImageDetails\n" . "INNER JOIN TravelImage\n" . "ON TravelImage.ImageID = TravelImageDetails.ImageID WHERE CountryCodeISO ='" . $row['ISO'] . "'";
$result = $pdo->query($sql);
images($result);
$pdo = null;
?>
        	</div>
        	</div>
        </div>
      </div>  <!-- end main content column -->
   </div>  <!-- end main content row -->
</div>   <!-- end main content container -->

<?php 
include "includes/travel-footer.inc.php";
?>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
   <script src="bootstrap3_travelTheme/dist/js/bootstrap.min.js"></script> 
   
Ejemplo n.º 14
0
                  <h1>Description : </h1>
                  <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem I
                  psum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like) ...<p>

                  <br>
                  <a href="#" class="right">Lire la suite</a>
                </div>
                <br>

                 <div class="content">
                 <h3>Ses Oeuvres</h3>
                      <div class="slider center">
                      <?php 
$result = requete('{"query":{"bool":{"must":[{"query_string":{"default_field":"oeuvre.pubDate","query":"\\"' . $_GET["artiste"] . '\\""}}],"must_not":[],"should":[]}},"sort":[],"facets":{}} ');
for ($i = 0; $i < $result['hits']['total']; $i++) {
    $imgs = images($result, $i);
    echo '<div><h3><a href=' . $imgs[count($imgs) - 1] . ' class="zoombox zgallery1" title="oeuvre.php" ><img src=' . $imgs[count($imgs) - 1] . ' ></a></h3></div>';
}
?>
                        
                      </div>
                  </div>
               
              </div>
              <br>
           </section>
            
          
            <footer>
           
                <div id="footer_top"> <br>
Ejemplo n.º 15
0
<?php

$entity = elgg_extract('entity', $vars);
if (!images()->isImage($entity)) {
    return;
}
?>
<div class="elgg-text-help">
	<?php 
echo elgg_echo('images:crop:instructions');
?>
</div>
<div>
	<?php 
$src = elgg_get_download_url($entity);
$info = getimagesize($entity->getFilenameOnFilestore());
echo elgg_view('input/cropper', ['src' => $src, 'name' => 'crop_coords', 'x1' => 0, 'y1' => 0, 'x2' => $info[0], 'y2' => $info[1], 'ratio' => '']);
?>
</div>
<div class="elgg-foot">
	<?php 
echo elgg_view('input/hidden', ['name' => 'guid', 'value' => $entity->guid]);
echo elgg_view('input/submit', ['value' => elgg_echo('images:crop')]);
?>
</div>
Ejemplo n.º 16
0
function center($article_limit)
{
    if (isset($_GET['category'])) {
        $id = $_GET['category'];
    }
    if (isset($_GET['articleid'])) {
        $articleid = $_GET['articleid'];
    }
    if (isset($_POST['submit_text'])) {
        processing();
        $processed = True;
    }
    if (isset($_POST['contactform'])) {
        contact();
        $processed = True;
    }
    if (isset($_GET['category'])) {
        $action = $_GET['category'];
    } else {
        if (isset($_GET['action'])) {
            $action = $_GET['action'];
        }
    }
    if (isset($processed) and $processed == True) {
        unset($action);
    }
    switch ($action) {
        case "archives":
            archives();
            break;
        case "contact":
            contact();
            break;
        case "rss":
            rss();
            break;
        case "login":
            login();
            break;
        case "categories":
            if (isset($_SESSION['Logged_In'])) {
                view_categories();
            }
            break;
        case "editcategory":
            if (isset($_SESSION['Logged_In'])) {
                edit_category();
            }
            break;
        case "new":
            if (isset($_SESSION['Logged_In'])) {
                new_article();
            }
            break;
        case "unpublished":
            if (isset($_SESSION['Logged_In'])) {
                unpublished_articles();
            }
            break;
        case "simpleedit":
            if (isset($_SESSION['Logged_In'])) {
                edit_article(simple);
            }
            break;
        case "advancededit":
            if (isset($_SESSION['Logged_In'])) {
                edit_article(advanced);
            }
            break;
        case "editcomment":
            if (isset($_SESSION['Logged_In'])) {
                edit_comment();
            }
            break;
        case "images":
            if (isset($_SESSION['Logged_In'])) {
                images();
            }
            break;
        case "process":
            if (isset($_SESSION['Logged_In']) and $display_further != "NO") {
                processing();
            }
            break;
        case "logout":
            session_start();
            $_SESSION = array();
            session_destroy();
            echo "<META HTTP-EQUIV='refresh' content='1; URL=" . $_SERVER['PHP_SELF'] . "'>";
            echo "<h2>" . l('log_out') . "</h2>";
            break;
        default:
            if (isset($_POST['search'])) {
                search();
            } else {
                if (isset($_POST['comment'])) {
                    comment("comment_posted");
                } else {
                    if ($processed == False) {
                        $article = get_id('article');
                        $category = get_id('category');
                        if ($article != "") {
                            $query = "SELECT * FROM " . s('prefix') . "articles WHERE seftitle = '{$article}'";
                            $shorten = 99990000;
                        } else {
                            if (isset($category)) {
                                $query_catname = "SELECT * FROM " . s('prefix') . "categories";
                                $result_catname = mysql_query($query_catname);
                                while ($r_catname = mysql_fetch_array($result_catname)) {
                                    if (isset($num_cat)) {
                                        $num_cat++;
                                    }
                                    if ($r_catname['seftitle'] == $category) {
                                        $use_cat_id = $r_catname['id'];
                                    }
                                }
                                if ($category == "") {
                                    $use_cat_id = 0;
                                    $category = 0;
                                }
                                if (s('display_new_on_home') == True) {
                                    if ($use_cat_id != 0) {
                                        $query = "SELECT * FROM " . s('prefix') . "articles WHERE position = 1 AND published = 1 AND category = {$use_cat_id} ORDER BY date DESC LIMIT {$article_limit}";
                                    } else {
                                        $query = "SELECT * FROM " . s('prefix') . "articles WHERE position = 1 AND published = 1 ORDER BY date DESC LIMIT {$article_limit}";
                                    }
                                } else {
                                    $query = "SELECT * FROM " . s('prefix') . "articles WHERE position = 1 AND published = 1 AND category = {$use_cat_id} ORDER BY date DESC LIMIT {$article_limit}";
                                }
                                if (isset($r['textlimit'])) {
                                    $shorten = $r['textlimit'];
                                }
                                if (isset($shorten) == 0) {
                                    $shorten = 9999000;
                                }
                            }
                        }
                        $result = mysql_query($query);
                        while ($r = mysql_fetch_array($result)) {
                            if ($article == "") {
                                $shorten = $r['textlimit'];
                                if ($shorten == 0) {
                                    $shorten = 99990000;
                                }
                            }
                            $comments_num = 0;
                            $comment_query = "SELECT * FROM " . s('prefix') . "comments WHERE articleid = {$r['id']}";
                            $comment_result = mysql_query($comment_query);
                            while ($comment_r = mysql_fetch_array($comment_result)) {
                                $comments_num++;
                            }
                            $date = date(s('date_format'), strtotime($r['date']));
                            $fp_date_format = date(s('fp_date_format'), strtotime($r['date']));
                            $position = $r['position'];
                            if ($category == "0") {
                                $category = s('home');
                            }
                            if ($r['displaytitle'] == "YES" and $article == "") {
                                echo "<h2><a href='" . s('website') . find_cat_sef($r['category']) . "/" . $r['seftitle'] . "/'>" . $r['title'] . "</a></h2>";
                            } else {
                                if ($r['displaytitle'] == "YES") {
                                    echo "<h2>" . $r['title'] . "</h2>";
                                }
                            }
                            if ($r['image'] != "") {
                                ?>
				<div class="image">
					<img src="<?php 
                                echo s('website') . s('image_folder');
                                ?>
/<?php 
                                echo $r['image'];
                                ?>
" alt="<?php 
                                echo $r['title'];
                                ?>
" />
				</div><?php 
                            }
                            // PHP files inclusion routine
                            $fulltext = $r['text'];
                            $findme = "[include]";
                            $pos = strpos($fulltext, $findme);
                            $findme = "[/include]";
                            $pos2 = strpos($fulltext, $findme);
                            $file = substr($fulltext, $pos + 9, $pos2 - 9);
                            if ($pos2 > 0) {
                                $text = str_replace("[include]", "|&|", $fulltext);
                                $text = str_replace("[/include]", "|&|", $text);
                                $text = explode("|&|", $text);
                                $num = count($text);
                                for ($i = 0;; $i++) {
                                    if ($i == $num) {
                                        break;
                                    }
                                    if (strpos($text[$i], '.php') === false and strpos($text[$i], '.txt') === false and strpos($text[$i], '.inc') === false) {
                                        echo substr(stripslashes($text[$i]), 0, $shorten);
                                    } else {
                                        include $text[$i];
                                    }
                                }
                            } else {
                                echo substr(stripslashes($fulltext), 0, $shorten);
                            }
                            if (isset($numrows)) {
                                $numrows++;
                            }
                            if ($article == "" and strlen($r['text']) > $shorten) {
                                echo "...</p>";
                            }
                            $commentable = $r['commentable'];
                            if ($r['position'] != 3 and $r['position'] != 4 or isset($_SESSION['Username'])) {
                                if ($article == "") {
                                    if ($r['displayinfo'] == "YES") {
                                        echo "<p class='" . s('date_class') . "'>";
                                        if (strlen($r['text']) > $shorten) {
                                            echo "<img src='" . s('website') . "images/more.gif' alt='' /> <a href='" . s('website') . $category . "/" . $r['seftitle'] . "/'>" . l('read_more') . "</a> ";
                                        }
                                        if ($commentable == "YES" or $commentable == "FREEZ") {
                                            echo "<img src='" . s('website') . "images/comment.gif' alt='' /> <a href='" . s('website') . $category . "/" . $r['seftitle'] . "/'>" . l('comments') . "(" . $comments_num . ")</a> ";
                                        }
                                        echo "<img src='" . s('website') . "images/timeicon.gif' alt='' /> " . $fp_date_format . "</p>";
                                    }
                                } else {
                                    echo "<p class='" . s('date_class') . "'>";
                                    if (isset($_SESSION['Logged_In'])) {
                                        echo l('edit_article') . " [ <a href='" . s('website') . "index.php?action=simpleedit&id={$r['id']}'>" . l('simple') . "</a> <img src='" . s('website') . "images/arrow.gif' alt='|' /> <a href='" . s('website') . "index.php?action=advancededit&id={$r['id']}'>" . l('advanced') . " </a> ] <img src='" . s('website') . "images/arrow.gif' alt='|' /> <a href='" . s('website') . "index.php?action=process&task=delete&id={$r['id']}'" . if_javascript_on(" onclick='return confirm(\"" . l('warning_delete') . "\");'", 'return') . ">" . l('delete_article') . "</a> <img src='" . s('website') . "images/arrow.gif' alt='|' /> ";
                                        if ($r['commentable'] == "FREEZ") {
                                            echo "<a href='" . s('website') . "index.php?action=process&task=unfreezecomments&id={$r['id']}'>" . l('unfreeze_comments') . "</a> <img src='" . s('website') . "images/arrow.gif' alt='|' /> ";
                                        } else {
                                            if ($r['commentable'] != "NO") {
                                                echo "<a href='" . s('website') . "index.php?action=process&task=freezecomments&id={$r['id']}'>" . l('freeze_comments') . "</a> <img src='" . s('website') . "images/arrow.gif' alt='|' /> ";
                                            }
                                        }
                                    }
                                    if ($category != s('home')) {
                                        $category = $category . "/";
                                    }
                                    echo "<a href='" . s('website');
                                    if ($category != s('home')) {
                                        echo $category . "'>";
                                    } else {
                                        echo "'>";
                                    }
                                    echo l('back') . "</a> <img src='" . s('website') . "images/timeicon.gif' alt='' /> " . $date . "</p>";
                                }
                            }
                        }
                    }
                }
            }
            if ($article != "" and $commentable == "YES") {
                comment("unfreezed");
            } else {
                if ($article != "" and $commentable == "FREEZ") {
                    comment("freezed");
                }
            }
    }
}
Ejemplo n.º 17
0
        statistic();
    }
    if ($id == 1) {
        change_password();
    }
    if ($id == 2) {
        tails($id);
    }
    if ($id == 3) {
        articles($id);
    }
    if ($id == 4) {
        messages($id);
    }
    if ($id == 9) {
        images($id);
    }
}
?>
<br /><br />
 
<div class="push"></div>
 
</center>
</div>
<div class="stopka"><?php 
stopka();
?>
</div>
</body>
</html>
Ejemplo n.º 18
0
" style="color: ">News</a></li>
            <li class="divider"></li>
            <li class="<?php 
    if ($page == 'faqs') {
        echo "active";
    }
    ?>
"><a tabindex="-1" href="<?php 
    echo base_url() . "faqs.html";
    ?>
" style="color: ">FAQ's</a></li>
            <li class="divider"></li>
            <li class="<?php 
    if ($page == 'tos') {
        echo "active";
    }
    ?>
"><a tabindex="-1" href="<?php 
    echo base_url() . "tos.html";
    ?>
" style="color: ">TOS</a></li>
        </ul>
    </section>
    <section class="col-lg-12" style="position: relative; margin-top: 30px;">
        <a href="https://www.facebook.com/pages/Surf4earn/360111967447244#" target="_blank"><img src="<?php 
    echo images() . "fb1.png";
    ?>
"></a>
    </section>
    <?php 
}
Ejemplo n.º 19
0
    }
}
if (!$container instanceof ElggEntity) {
    register_error(elgg_echo('images:error:not_found'));
    forward(REFERRER);
}
if (!$entity) {
    $entity = new ElggFile();
    $entity->subtype = 'file';
    $entity->container_guid = $container ? $container->guid : elgg_get_logged_in_user_guid();
}
if (!$entity->canEdit() || !$container->canWriteToContainer(0, $entity->getType(), $entity->getSubtype())) {
    register_error(elgg_echo('images:error:permission_denied'));
    forward(REFERRER);
}
$entity = images()->createFromUpload('upload', $entity);
if (!$entity) {
    register_error(elgg_echo('images:upload:error:invalid_file'));
    forward(REFERRER);
}
$entity->title = $params->title;
$entity->description = $params->description;
$entity->tags = string_to_tag_array((string) $params->tags);
$entity->access_id = isset($params->access_id) ? $params->access_id : get_default_access();
if ($entity->save()) {
    if (elgg_is_xhr()) {
        echo json_encode($entity->toObject());
    }
    if (!$params->guid) {
        elgg_create_river_item(['view' => 'river/object/image', 'action_type' => 'create', 'subject_guid' => elgg_get_logged_in_user_guid(), 'object_guid' => $entity->guid]);
    }
Ejemplo n.º 20
0
/**
 * Clear all entity avatars
 *
 * @param ElggEntity $entity Entity
 * @return bool
 */
function elgg_images_clear_avatars(ElggEntity $entity)
{
    if (images()->isImage($entity)) {
        return images()->clearThumbs($entity);
    }
    return images()->clearAvatars($entity);
}
Ejemplo n.º 21
0
 /**
  * {@inheritdoc}
  */
 public function clearThumbs()
 {
     return images()->clearThumbs($this);
 }
Ejemplo n.º 22
0
?>
        </div>
        
        <div class="panel panel-info">
           <div class="panel-heading">Images From <?php 
echo $name;
?>
</div> 
           <div class="well">
            <div class="row">         
            <?php 
$row = findUserRowPics();
if ($row->rowCount() == 0) {
    echo "This user has no pictures yet!";
} else {
    images($row);
}
?>
        	</div>
        	</div>
        </div>
  
      
      </div>  <!-- end main content column -->
   </div>  <!-- end main content row -->
</div>   <!-- end main content container -->

<?php 
include "includes/travel-footer.inc.php";
?>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
Ejemplo n.º 23
0
        print "http://dropbox.easytospell.net/thumb/{$row['id']}/{$row['id']}.jpg\n";
    }
}
print "GET\n";
print var_dump($_GET);
print "POST\n";
print var_dump($_POST);
$args = explode('/', $_GET['args']);
switch ($_GET['cmd']) {
    case 'get':
        switch ($args[0]) {
            case 'tags':
                tags($db);
                break;
            case 'images':
                images($db);
                break;
            case 'thumbs':
                thumbs($db);
                break;
        }
        break;
}
?>

api methods:
	get:
		tags:
			namespace:
				password:
		images:
Ejemplo n.º 24
0
<?php

$sql = "select s.id, s.name, s.contact, s.email, s.dateofbirth, \n\t\tcase s.gender when 0 then 'Male' else 'Female' end as Gender,\n\t\ts.address, ct.name as City, cn.name as Country, s.cv\n\tfrom student as s, city as ct, country as cn where \n\ts.cityId = ct.Id and ct.countryId = cn.Id and s.id = " . ms($_REQUEST['id']);
$r = mysql_query($sql);
while ($s = mysql_fetch_array($r)) {
    print '<div class="imagedetails">';
    if (isset($_REQUEST['img'])) {
        print '<img src="StudentImages/' . base64_decode(ms($_REQUEST['img'])) . '"/>';
    } else {
        singleImage($s[0]);
    }
    print '<div class="allimagecontainer"><div class="allimages">';
    images($s[0]);
    print '</div></div>';
    print '</div>';
    print '<div class="details">';
    print '<div class="singledetails">';
    print '<span>Name: <span><b>' . $s['name'] . '</b></span></span><br>';
    print '<span>Contact: <span>' . $s['contact'] . '</span></span><br>';
    print '<span>E-mail: <span>' . $s['email'] . '</span></span><br>';
    print '<span>Date of Birth: <span>' . $s['dateofbirth'] . '</span></span><br>';
    print '<span>Gender: <span>' . $s['Gender'] . '</span></span><br>';
    print '<span>Address: <span>' . $s['address'] . '</span></span><br>';
    print '<span>City: <span>' . $s['City'] . '</span></span><br>';
    print '<span>Country: <span>' . $s['Country'] . '</span></span><br>';
    print '<span>Course: </span>';
    $sql3 = "select c.name from coursevsstudent cs, course c \n\twhere cs.courseId = c.Id and cs.studentid = " . $s[0];
    $r3 = mysql_query($sql3);
    while ($s3 = mysql_fetch_row($r3)) {
        print $s3[0] . ", ";
    }
Ejemplo n.º 25
0
      <?php 
function images($dir)
{
    $files1 = scandir($dir);
    foreach ($files1 as $x => $value) {
        if ($value == "." || $value == "..") {
            unset($files1[$x]);
        }
    }
    foreach ($files1 as $x => $value) {
        echo "<li class=\"col-md-6\"><img class=\"img-responsive\" src=\"{$dir}{$value}\"></li>";
    }
}
images("imgs/initialdesigns/");
images("imgs/paperproto1/");
images("imgs/paperproto2/");
?>
      </ul>

      <div class="modal fade" id="my<a href="http://www.jqueryscript.net/tags.php?/Modal/">Modal</a>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

        <div class="modal-dialog">

          <div class="modal-content">

            <div class="modal-body"> </div>

          </div>

        </div>
Ejemplo n.º 26
0
/**
 * Update avatar access id when entity is saved
 *
 * @param string     $event  "update:after"
 * @param string     $type   "all"
 * @param ElggEntity $entity Entity
 */
function images_update_avatar_access($event, $type, $entity)
{
    if (!$entity instanceof ElggEntity) {
        return;
    }
    $access_id = (int) $entity->access_id;
    $avatars = images()->getAvatars($entity);
    if (!$avatars) {
        return;
    }
    foreach ($avatars as $avatar) {
        $avatar->access_id = $access_id;
        $avatar->save();
    }
}
Ejemplo n.º 27
0
$uri = $_REQUEST['page'];
$r = new Pefi_Router($uri, $_PEFI->tr);
$page = $r->page->getKey();
$imgsdir = "images/{$page}";
$imgs = discoverFiles($imgsdir, array('jpg', 'gif', 'png'));
if ($_PEFI->crdntls->can('assets')) {
    if ($todo === 'assets-generatethumbs') {
        $_PEFI->view->content .= thumbs($imgs);
    } elseif ($todo === 'assets-upload') {
        $_PEFI->view->messages[] = upload($imgsdir);
        // images were added: discover again
        $imgs = discoverFiles($imgsdir, array('jpg', 'gif', 'png'));
    }
}
if ($todo !== 'assets-generatethumbs') {
    $_PEFI->view->content = images($imgs);
    if ($_PEFI->crdntls->can('assets')) {
        $_PEFI->view->content .= form($page);
    }
}
$_PEFI->view->title = 'Assets management';
function upload($imgsdir)
{
    if ($_FILES['newImage']['size'] !== 0) {
        $name = basename($_POST['newImageName'] == '' ? strtolower($_FILES['newImage']['name']) : strtolower($_POST['newImageName']), '.jpg');
        $fName = $imgsdir . '/' . $name . '.jpg';
        createDirsInPath($fName);
        if (move_uploaded_file($_FILES['newImage']['tmp_name'], $fName)) {
            $result = "The file <b>" . $fName . "</b> has been uploaded <br />";
            $result .= createThumb($fName);
        } else {
Ejemplo n.º 28
0
<?php

lv('auth/auth_header');
?>
<div class="lb_content">
    <div class="login_logo"><img src="<?php 
echo images();
?>
logo.png" alt="麦小米" /></div>
	<div class="cf">
		<h2 class="lb_ribbon lb_blue"><span>米友,请登录</span></h2>								
		<a href="<?php 
echo site_url('auth/reg');
?>
" class="right small sl_link">
			<span>没有帐号?免费注册</span>
		</a>
	</div>
	<div class="row m_cont">
		<div class="eight columns centered">
			<div class="l_pane">
				<div id="infoMessage">
				<p>为了保证浏览效果,建议使用chrome浏览器。如有登录问题,请<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=1193800411&amp;Site=maixiaomi.com&amp;Menu=yes" class="qq">联系我们</a>或<?php 
echo anchor('auth/forgot_password', '找回密码');
?>
</p>
				<span class="large m_color"><?php 
echo $message;
?>
</span>
				</div>
Ejemplo n.º 29
0
?>
                    <br>
                    </div>
                    <div class="sub_deeppink"><span>Ajouter un Artiste</span></div><br>

                </div><div class="sep"></div>

              
                <div class="article">
                
                    <div class="seagreen"><span>Oeuvres Tendances</span></div>

                    <div style="height:370px">
                      <?php 
for ($i = 0; $i < 3; $i++) {
    $imgs = images($oeuvretend, $i);
    $p = pubData($oeuvretend, $i);
    $title = body_title($oeuvretend, $i);
    echo '<div class="oeuvre">';
    echo '<h2>' . $p[0] . '</h2>';
    echo '<img width="65" src=' . $imgs[count($imgs) - 1] . '>';
    echo '<div class="oeuvre_detail">' . $title . '</div>';
    echo '<div class="oeuvre_plus"><a class="textdeco" href="oeuvre.php?artiste=' . $p[0] . '&;oeuvre=">+</a></div>';
    echo '</div>';
}
?>
                    <br>
                    </div>