示例#1
0
<div class="MiniProfile" id="MiniNPO">
    <h2>ORGANIZATION</h2>
	<div class="info">
    	<div class='image'>
       		<?php 
if ($npo->logo) {
    ?>
				<div class='picture'>
				<?php 
    get_item_image('npos', $npo->id, $npo->logo, 'cropped120', 'npologo');
    ?>
				</div>
        	<?php 
} else {
    ?>
        		<?php 
    display_default_image('npo');
    ?>
        	<?php 
}
?>
			<?php 
echo anchor('npo/view/' . $npo->id, '<img class="border" src="' . base_url() . 'images/tout-image-border.png" />');
?>
		</div>
		<p><?php 
echo anchor('npo/view/' . $npo->id, $npo->name, array('class' => 'namelink'));
?>
</p>

		<p class="header">Address:</p>
示例#2
0
文件: beex.php 项目: beexsvn/Beex.org
    function create_browser($result, $table, $folder = 'profile', $widget = false, $from_cluster = false, $small = false, $from_npo = true)
    {
        $i = 0;
        foreach ($result->result() as $item) {
            if ($table == 'challenges') {
                $pronoun = 'I';
                $CI =& get_instance();
                $pronoun = $CI->MItems->hasTeammates($item->id);
                $profile = $CI->MItems->getUserByChallenge($item->id)->row();
                if ($profile) {
                    if ($folder == 'profile') {
                        $image_name = $profile->profile_pic;
                        $link_id = $profile->user_id;
                    } else {
                        $link_id = $item->id;
                        if ($item->challenge_video) {
                            $image_name = get_video_thumbnail($item->challenge_video);
                        } else {
                            $image_name = $item->challenge_image;
                        }
                    }
                    ?>
				
				<div class='row join<?php 
                    if ($widget) {
                        echo " widget" . $i;
                    }
                    if ($small) {
                        echo ' smaller';
                    }
                    ?>
' id="join<?php 
                    echo $item->id;
                    ?>
">
					
					<?php 
                    /*if(!($widget || $from_cluster)) : ?>
                    			<img class='watermark' src='<?php echo base_url(); ?>images/glyphs/join.png'>
                    		<? endif; */
                    ?>
					
					<?php 
                    echo $this->displayProfileImage($link_id, $image_name, $folder);
                    ?>
					<div class="float_left copy">
						<?php 
                    echo anchor('challenge/view/' . $item->id, $item->challenge_title, "class='activity orange bold' style='display:inline-block;' target='_parent'");
                    ?>
						<?php 
                    if (!$widget) {
                        ?>
							<?php 
                        if ($CI->session->userdata('user_id') == $item->user_id) {
                            echo anchor('challenge/editor/' . $item->id . '/edit', "&lt;edit&gt;", 'class="browser_button"');
                        }
                        ?>
						<?php 
                    }
                    ?>
						<?php 
                    if ($from_cluster) {
                        ?>
							<a class="deactivate_challenge browser_button" id="deactivate_<?php 
                        echo $item->id;
                        ?>
">&lt;deactivate from cluster&gt;</a>
						<?php 
                    }
                    ?>
						<p class="activity"><?php 
                    echo anchor('user/view/' . $profile->user_id, $profile->first_name . ' ' . $profile->last_name, "target='_parent'");
                    ?>
 will <?php 
                    echo anchor('challenge/view/' . $item->id, $item->challenge_declaration, "target='_parent'");
                    ?>
 if $<?php 
                    echo $item->challenge_goal;
                    ?>
 is raised for <?php 
                    echo anchor('npo/view/' . $item->challenge_npo, $item->name, 'target="_parent"');
                    ?>
</p>
						<?php 
                    if ($widget) {
                        ?>
							<?php 
                        echo anchor('challenge/view/' . $item->id . '/give', '<img class="give_button" src="' . base_url() . 'images/buttons/widget-give.png">', 'target="_blank"');
                        ?>
						<?php 
                    }
                    ?>
						<p class='activity raised_goal'>Raised: $<?php 
                    echo number_format($CI->MItems->amountRaised($item->item_id), 2);
                    ?>
 | Goal: $<?php 
                    echo number_format($item->challenge_goal);
                    ?>
</p>
						<p class="date"><?php 
                    echo date('m.d.Y', strtotime($item->challenge_created));
                    ?>
 at <?php 
                    echo date('H:i', strtotime($item->challenge_created));
                    ?>
</p>					
						<div style='clear:both;'></div>
					</div>
					<div style='clear:both;'></div>
				</div>
				
				
				<?php 
                }
            } elseif ($table == 'clusters') {
                if ($folder == 'profile' && false) {
                    $image_name = $profile->profile_pic;
                    $link_id = $profile->user_id;
                } else {
                    $link_id = $item->theid;
                    $image_name = $item->cluster_image;
                }
                $CI =& get_instance();
                $challenges = $CI->MItems->getChallenge(array('cluster_id' => $item->theid));
                ?>
				<div class='row'>
					
					<img class='watermark' src='<?php 
                echo base_url();
                ?>
images/glyphs/cluster.png'>
					<?php 
                echo $this->displayProfileImage($link_id, $image_name, $folder);
                ?>
					
					<div class="float_left copy">
						<?php 
                echo anchor('cluster/view/' . $item->theid, $item->cluster_title, "class='activity orange bold'");
                ?>
						<p class="activity"><?php 
                echo $item->cluster_blurb;
                ?>
</p>
						<p class='activity raised_goal'>Raised: $0 | Goal: $<?php 
                echo $item->cluster_goal;
                ?>
</p>	
						<?php 
                echo anchor('cluster/joina/' . $item->theid, '<img class="rollover" src="' . base_url() . 'images/buttons/join-browse-off.png" />');
                ?>
						<p class="date"><?php 
                echo date('m.d.Y', strtotime($item->created));
                ?>
 at <?php 
                echo date('H:i', strtotime($item->created));
                ?>
</p>

						<div style='clear:both;'></div>
					</div>
					<div style='clear:both;'></div>
					<?php 
                if ($from_npo) {
                    $this->create_browser($challenges, 'challenges', 'profile', false, false, true);
                }
                ?>
				</div>
				<?php 
            } elseif ($table == 'nposearch') {
                ?>
				<div class='row'>
					
					<img class='watermark' src='<?php 
                echo base_url();
                ?>
images/glyphs/npo.png'>
					
					<div class='profile_image'>
			       		<?php 
                if ($item->logo) {
                    ?>
							<?php 
                    get_item_image('npos', $item->id, $item->logo, 'cropped120', 'picture');
                    ?>
			        	<?php 
                } else {
                    ?>
			        		<?php 
                    display_default_image('npo');
                    ?>
			        	<?php 
                }
                ?>
						<?php 
                echo anchor('npo/view/' . $item->id, '<img class="border" src="' . base_url() . 'images/tout-image-border.png" />');
                ?>
					</div>
					
					<div class="float_left copy">
						<?php 
                echo anchor('npo/view/' . $item->id, $item->name, "class='activity orange bold'");
                ?>
						<p class="activity"><?php 
                echo $item->blurb;
                ?>
</p>

						<div style='clear:both;'></div>
					</div>
					<div style='clear:both;'></div>

				</div>
				<?php 
            } elseif ($table == 'npos') {
                ?>
				<?php 
                if ($i % 4 == 0) {
                    ?>
				<div class="npo_row">
				<?php 
                }
                ?>
				
				<div class="item npo" <?php 
                if ($i % 4 == 3) {
                    echo 'style="margin-right:0px;"';
                }
                ?>
>
			    	<div class='image'>
			       		<?php 
                if ($item->logo) {
                    ?>
							<div class='picture'>
							<?php 
                    get_item_image('npos', $item->id, $item->logo, 'cropped120', 'npologo');
                    ?>
							</div>
			        	<?php 
                } else {
                    ?>
			        		<?php 
                    display_default_image('npo');
                    ?>
			        	<?php 
                }
                ?>
						<?php 
                echo anchor('npo/view/' . $item->id, '<img class="border" src="' . base_url() . 'images/tout-image-border.png" />');
                ?>
					</div>
					<p><?php 
                echo anchor('npo/view/' . $item->id, $item->name, array('class' => 'namelink'));
                ?>
</p>
			   </div>
			
				<?php 
                if ($i % 4 == 3) {
                    ?>
					<div class="clear_both"></div>
				</div>
				<?php 
                }
                ?>

				<?php 
            } elseif ($table == 'people') {
                ?>
				
				<div class='row'>
				
					<img class='watermark' src='<?php 
                echo base_url();
                ?>
images/glyphs/user.png'>
					<?php 
                echo $this->displayProfileImage($item->user_id, $item->profile_pic);
                ?>
					<div class="float_left copy">
						<?php 
                echo anchor('user/view/' . $item->user_id, $item->first_name . ' ' . $item->last_name, "class='activity orange bold'");
                ?>
						<div style='clear:both;'></div>
					</div>
					<div style='clear:both;'></div>
				</div>
				
				
				<?php 
            }
            $i++;
        }
        if ($table == 'npos' && $i % 4 != 0) {
            echo "</div>";
        }
        echo '<div style="clear:both;"></div>';
    }
示例#3
0
     }
 } else {
     if ($HTTP_VARS['op'] == 'my_item_history') {
         $show_listings = FALSE;
         $item_r = fetch_item_instance_r($HTTP_VARS['item_id'], $HTTP_VARS['instance_no']);
         if (is_not_empty_array($item_r)) {
             $footer_links_r[] = array(url => "item_display.php?item_id=" . $item_r['item_id'] . "&instance_no=" . $item_r['instance_no'], text => get_opendb_lang_var('back_to_item'));
             if (is_opendb_session_var('listing_url_vars')) {
                 $footer_links_r[] = array(url => "listings.php?" . get_url_string(get_opendb_session_var('listing_url_vars')), text => get_opendb_lang_var('back_to_listing'));
             }
             // Cannot view item history, unless you are admin, or own the item.
             if (is_user_owner_of_item($item_r['item_id'], $item_r['instance_no'], get_opendb_session_var('user_id')) || is_user_granted_permission(PERM_ADMIN_BORROWER)) {
                 $show_listings = TRUE;
                 $titleMaskCfg = new TitleMask('item_display');
                 $page_title = get_opendb_lang_var('history_for_title', 'display_title', $titleMaskCfg->expand_item_title($item_r));
                 $page_image = get_item_image($item_r['s_item_type'], $item_r['item_id']);
                 if (is_numeric($listingObject->getItemsPerPage())) {
                     $listingObject->setTotalItems(fetch_item_instance_history_cnt($item_r['item_id'], $item_r['instance_no']));
                     if ($listingObject->getTotalItemCount() > 0) {
                         $result = fetch_item_instance_history_rs($item_r['item_id'], $item_r['instance_no'], $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder(), $listingObject->getStartIndex(), $listingObject->getItemsPerPage());
                     }
                 } else {
                     $result = fetch_item_instance_history_rs($item_r['item_id'], $item_r['instance_no'], $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder());
                 }
             } else {
                 opendb_not_authorised_page();
             }
         } else {
             echo _theme_header(get_opendb_lang_var('item_not_found'));
             echo "<p class=\"error\">" . get_opendb_lang_var('item_not_found') . "</p>";
             echo _theme_footer();
示例#4
0
		<div class="<?php 
echo apply_filters('quest_content_container_cls', 'container');
?>
">
			<div class="row">
        <noscript>
        <div class="noscript_warning">PLEASE NOTE: JAVASCRIPT IS DISABLED ON YOUR BROWSER. For the best user experience, please enable javascript on your browser now.</div>
        </noscript>

				<div id="primary" class="content-area single col-md-12">
					<main id="main" class="site-main" role="main">
            <div id="drs-content" class="row">
              <div id="drs-loading"></div>
              <div id="drs-item-left" class="col-sm-6 one_half">
								<?php 
get_item_image();
?>
								<?php 
get_associated_files();
?>
            	</div>
              <div id="drs-item-right" class="col-sm-6 last">
            		<div id="drs-item-details"><?php 
echo get_item_details($data, $meta_options);
?>
</div>
								<?php 
get_download_links();
?>
            	</div>
            </div><!-- #drs-content -->
示例#5
0
 if ($HTTP_VARS['op'] == 'uploaded') {
     $import_cache_r = fetch_import_cache_r($HTTP_VARS['ic_sequence_number'], $HTTP_VARS['owner_id']);
     if (is_not_empty_array($import_cache_r)) {
         $importPlugin =& get_import_plugin($import_cache_r['plugin_name']);
         if ($importPlugin !== NULL) {
             $inFile = import_cache_fetch_file($HTTP_VARS['ic_sequence_number']);
             if ($inFile) {
                 $fileHandler = new WrapperFileHandler($inFile);
                 if (strcmp($HTTP_VARS['owner_id'], get_opendb_session_var('user_id')) === 0) {
                     $page_title = get_opendb_lang_var('type_import', array('description' => $importPlugin->get_display_name()));
                 } else {
                     $page_title = get_opendb_lang_var('type_import_items_for_name', array('description' => $importPlugin->get_display_name(), 'fullname' => fetch_user_name($HTTP_VARS['owner_id']), 'user_id' => $HTTP_VARS['owner_id']));
                 }
                 echo _theme_header($page_title);
                 if ($importPlugin->get_plugin_type() == 'row') {
                     echo "<h2>" . $page_title . " " . get_item_image($HTTP_VARS['s_item_type']) . "</h2>\n";
                 } else {
                     echo "<h2>" . $page_title . "</h2>";
                 }
                 echo get_uploaded_form($importPlugin, $importPlugin->get_plugin_type() == 'row' ? $importPlugin->read_header($fileHandler, $error) : NULL, $HTTP_VARS);
                 unset($fileHandler);
                 @fclose($inFile);
                 echo _theme_footer();
             } else {
                 echo _theme_header(get_opendb_lang_var('undefined_error'));
                 echo "<p class=\"error\">" . get_opendb_lang_var('undefined_error') . "</p>";
                 echo _theme_footer();
             }
         } else {
             //if($importPlugin !== NULL)
             echo _theme_header(get_opendb_lang_var('undefined_error'));
示例#6
0
include_once "./lib/export.php";
include_once "./lib/item_attribute.php";
include_once "./lib/TitleMask.class.php";
include_once "./lib/item_display.php";
include_once "./lib/site_plugin.php";
if (is_site_enabled()) {
    if (is_opendb_valid_session() || is_site_public_access()) {
        if (is_user_granted_permission(PERM_VIEW_ITEM_DISPLAY)) {
            if (is_numeric($HTTP_VARS['instance_no'])) {
                $item_r = fetch_item_instance_r($HTTP_VARS['item_id'], $HTTP_VARS['instance_no']);
            }
            if (is_not_empty_array($item_r)) {
                $titleMaskCfg = new TitleMask('item_display');
                $page_title = $titleMaskCfg->expand_item_title($item_r);
                echo _theme_header($page_title, $HTTP_VARS['inc_menu']);
                echo "<h2>" . $page_title . " " . get_item_image($item_r['s_item_type'], $item_r['item_id']) . "</h2>";
                // ---------------- Display IMAGE attributes ------------------------------------
                if (get_opendb_config_var('item_display', 'show_item_image') !== FALSE && is_user_granted_permission(PERM_VIEW_ITEM_COVERS)) {
                    $results = fetch_item_attribute_type_rs($item_r['s_item_type'], 'IMAGE');
                    if ($results) {
                        $coverimages_rs = NULL;
                        while ($image_attribute_type_r = db_fetch_assoc($results)) {
                            $imageurl_r = fetch_attribute_val_r($item_r['item_id'], $item_r['instance_no'], $image_attribute_type_r['s_attribute_type'], $image_attribute_type_r['order_no']);
                            if ($imageurl_r !== FALSE) {
                                while (list(, $imageurl) = each($imageurl_r)) {
                                    $coverimages_rs[] = array('file' => file_cache_get_image_r($imageurl, 'display'), 'prompt' => $image_attribute_type_r['prompt']);
                                }
                            }
                        }
                        db_free_result($results);
                        // provide default if no images
示例#7
0
/**
 * Will work out based on the $op what the title should be.  It will
 * return a complete heading, including calling the _theme_header
 * and everything.
 */
function do_op_title($item_r, $status_type_r, $op)
{
    global $titleMaskCfg;
    global $HTTP_VARS;
    // hack
    if ($op == 'new' || $op == 'site' || $op == 'site-search' || $op == 'insert') {
        if ($item_r['owner_id'] != get_opendb_session_var('user_id')) {
            $item_title = get_opendb_lang_var('add_new_item_for_name', array('user_id' => $item_r['owner_id'], 'fullname' => fetch_user_name($item_r['owner_id'])));
        } else {
            $item_title = get_opendb_lang_var('add_new_item');
        }
    } else {
        if ($op == 'update' || $op == 'delete' || $op == 'delete_related') {
            $item_title = get_opendb_lang_var($op . '_item');
        } else {
            if ($op == 'refresh' || $op == 'edit' || $op == 'clone_item') {
                if ($op == 'clone_item') {
                    $op = 'clone';
                }
                $item_title = get_opendb_lang_var($op . '_title', array('display_title' => $titleMaskCfg->expand_item_title($item_r)));
            } else {
                if ($op == 'newinstance') {
                    // temporarily remove instance_no so that title renders correctly.
                    $item_r['instance_no'] = NULL;
                    $item_title = get_opendb_lang_var('new_item_instance_title', array('display_title' => $titleMaskCfg->expand_item_title($item_r)));
                }
            }
        }
    }
    echo _theme_header($item_title, $HTTP_VARS['inc_menu']);
    echo "<h2>" . $item_title . " " . get_item_image($item_r['s_item_type']) . "</h2>\n";
}
示例#8
0
<div class="MiniProfile" id="MiniCluster">
    <h2>Cluster Stub</h2>
    <div class="info">
		<?php 
if ($cluster->cluster_image) {
    ?>
    	<div class='image'>
            <?php 
    echo anchor('cluster/view/' . $cluster->theid, get_item_image('clusters', $cluster->theid, $cluster->cluster_image, 'cropped120', '', 1));
    ?>
			<img class="border" src="<?php 
    echo base_url();
    ?>
images/tout-image-border.png" />
    	</div>
    	<?php 
}
?>
    
		<?php 
echo anchor('cluster/view/' . $cluster->theid, $cluster->cluster_title, array('class' => 'namelink'));
?>
	</div>
	<img src="<?php 
echo base_url();
?>
images/backgrounds/left-tout-bottom.gif" />
</div>