403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/icd/components/com_staffmaster/views/listall/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/icd/components/com_staffmaster/views/listall//view.html.php
<?php
/**
 * File: view.html.php
 *
 * Staff Master 0_7_5_5
 *
 * Staff Master - Staff Members and Departments Manager
 *
 * @version 0.7.5.5
 * @package StaffMaster_0_7_5_5
 * @subpackage: view_list
 * @copyright (C) 2007-2008 Travis Hubbard
 * @license http://www.gnu.org/licenses/  GNU/GPL v3
 * @link http://www.systemsunited.net/
 **/
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.view');

/**
 * Staff List View Class
 */
class StaffViewListall extends JView  {

	/**
	 * Default display method for the class
	 *
	 * @param mixed 	$tpl can contain other display template params
	 * @param stdObj 	$staff_list contains all published staff sorted by department ordering and then by staff ordering
	 * @param stdObj 	$departments_list  contains all published departments sorted by ordering
	 * @param stdObj 	$params contains all params from settings model
	 * @param stdObj 	$displayImage contains a setting from the menu or config, yes/no: to displaying staff images in this view
	 */
	function display( $tpl = null , $staff_list , $departments_list , $params , $displayImage , $cropped_bios , $parsed_acl )  {

		global $option;

		$cparams  = JComponentHelper::getParams( $option );

		$show_sm_link = $cparams->get( 'show_sm_link' );

		//Colors
		$page_title_color_html 			= '';
		$dept_name_color_html			= '';
		$dept_desc_color_html			= '';
		$staff_name_color_html			= '';
		$staff_title_color_html			= '';
		$staff_bio_color_html			= '';
		$dept_unique_foot_color_html	= '';
		$dept_general_foot_color_html	= '';

		$custom_colors = array();

		if( $params->use_custom_colors )  {

			$cc = explode( ';' , $params->custom_colors );

			foreach( $cc as $tcc )  {

				$tcc = explode( '=' , $tcc );

				$custom_colors[ trim( $tcc[ 0 ] ) ] = $tcc[ 1 ];

			}

			if( isset( $custom_colors['page_title_color'] ) )  {
				if( !empty( $custom_colors['page_title_color'] ) )
					$page_title_color_html = 'style="color:#' 		 . $custom_colors['page_title_color'] .'"';
			}

			if( isset( $custom_colors['dept_name_color'] 			) )  {
				if( !empty( $custom_colors['dept_name_color'] ) )
					$dept_name_color_html = 'style="color:#' 		 . $custom_colors['dept_name_color'] .'"';
			}

			if( isset( $custom_colors['dept_desc_color'] 			) )  {
				if( !empty( $custom_colors['dept_desc_color'] ) )
				$dept_desc_color_html = 'style="color:#' 		 . $custom_colors['dept_desc_color'] .'"';
			}

			if( isset( $custom_colors['staff_name_color'] 			) )  {
				if( !empty( $custom_colors['staff_name_color'] ) )
					$staff_name_color_html = 'style="color:#' 		 . $custom_colors['staff_name_color'] .'"';
			}

			if( isset( $custom_colors['staff_title_color'] 		) )  {
				if( !empty( $custom_colors['staff_title_color'] ) )
					$staff_title_color_html = 'style="color:#' 		 . $custom_colors['staff_title_color'] .'"';
			}

			if( isset( $custom_colors['staff_bio_color'] 			) )  {
				if( !empty( $custom_colors['staff_bio_color'] ) )
					$staff_bio_color_html = 'style="color:#' 		 . $custom_colors['staff_bio_color'] .'"';
			}

			if( isset( $custom_colors['dept_unique_foot_color'] 	) )  {
				if( !empty( $custom_colors['dept_unique_foot_color'] ) )
					$dept_unique_foot_color_html = 'style="color:#'  . $custom_colors['dept_unique_foot_color'] .'"';
			}

			if( isset( $custom_colors['dept_general_foot_color'] 	) )  {
				if( !empty( $custom_colors['dept_general_foot_color'] ) )
					$dept_general_foot_color_html = 'style="color:#' .  $custom_colors['dept_general_foot_color'] .'"';
			}

		}

		$staff_html = array();

		foreach( $staff_list as $staff_by_dept )  {

			foreach( $staff_by_dept as $staff )  {

				if( empty( $staff->title ) )  {
					$staff_html['title'][ $staff->alias ] = $params->staff_title_default;
				}
				else  {
					$staff_html['title'][ $staff->alias ] = $staff->title;
				}

				/**** Staff Image Setup ****/
				// If there is not an image set for this staff member
				// use the image default set in settings
				$image_src = $params->staff_image_path;

				if( empty( $staff->image_file_name ) )  {

					if( empty( $params->staff_image_default ) )  {

						$image_src = '/components/' . $option . '/images/staff_empty.png';

					}
					else {

						$image_src .= $params->staff_image_default;

					}

				}
				else  {

					$image_src .= $staff->image_file_name;

				}

				// compile all variables to form image html
				$image_html = '<img src="'.$image_src.'" '

							. 'alt="' . $staff->name.'" '

							. 'title="'.$staff->name.'" '

							. 'class="staff_image" ';

					if( isset( $parsed_acl['image_width'] ) )
						$image_html .= 'width="' . $parsed_acl['image_width'] . '" ';

					if( isset( $parsed_acl['image_height'] ) )
						$image_html .= 'height="' . $parsed_acl['image_height'] . '" ';

				$image_html	.= ' />';

				$staff_html['image'][ $staff->alias ] = $image_html;

				// create the empty array set so that the indexes exist
				$staff_html['bio'][ $staff->alias ] = '';

				// if we did not set cropped_bios to false in controller.php
				if( $cropped_bios )  {

					// make sure that this specific index is set, and if it is not empty, enter it into staff_html to be output in default.php
					if( isset( $cropped_bios[ $staff->alias ] ) && !empty( $cropped_bios[ $staff->alias ] ) )
						$staff_html['bio'][ $staff->alias ] = $cropped_bios[ $staff->alias ];

				}

				/**** Staff Position Setup ****/
				// If there is not a staff position set for this staff member
				// use the staff position default set in settings
				if( $params->linkable_staff_name )  {

					$staff_name_link = JRoute::_( 'index.php?option=' . $option . '&view=staff&name=' .  $staff->alias );

					$staff_name_link_html = '<a href="' . $staff_name_link .'" ';

					if( $params->use_custom_colors )
						$staff_name_link_html .= $staff_name_color_html;

					$staff_name_link_html .= '>' .  $staff->name . '</a>';

					$staff_html['name'][ $staff->alias ] = $staff_name_link_html;
				}
			}
		}

		$staff_image_class = 'staff_image_' . $params->staff_image_pos ;

		if( $params->staff_image_pos == 'right' )  {
			$staff_name_class   = 'staff_name_left';
			$staff_bio_class    = 'staff_bio_left';
			$read_contact_class = 'read_contact_left';
		}
		else {
			$staff_name_class   = 'staff_name_right';
			$staff_bio_class    = 'staff_bio_right';
			$read_contact_class = 'read_contact_right';
		}

		$dept_html = array();

		foreach( $departments_list as $department )  {

			if( $params->linkable_department )  {

				$department_link = JRoute::_( 'index.php?option=' . $option . '&view=department&name=' . $department->alias );

				$dept_html['name'][ $department->alias ] = '<a href="' . $department_link .'" >' .  $department->name . '</a>';

			}
			else  {

				$dept_html['name'][ $department->alias ] = $department->name;

			}

			$dept_html['name'][ $department->alias ] = '<h2 class="department_name" ' . $dept_name_color_html . ' > ' .  $dept_html['name'][ $department->alias ] .'</h2>';

			$dept_html['desc'][ $department->alias ] = '';

			if( !empty( $department->description ) )  {

				// Search for the {readmore} tag and split the text up accordingly.
				$text = stripslashes( str_replace('<br>', '<br />', $department->description ) );

				$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';

				$tagPos	= preg_match($pattern, $text);

				if ($tagPos == 0)	{

					$dept_html['desc'][ $department->alias ]	= $text;

				} else 	{

					$department->description = preg_split($pattern, $text, 2);

					$department_description_link = JRoute::_( 'index.php?option=' . $option . '&view=department&name=' .  $department->alias );

					$department_description_link_html = '<br /><a href="' . $department_description_link .'" >' . '<span class="staff-readmore">' . JText::_('Read More...'). '</span></a>';

					$dept_html['desc'][ $department->alias ] = $department->description[0] . $department_description_link_html;

				}

				$dept_html['desc'][ $department->alias ] = '<div class="department_description_table" ' . $dept_desc_color_html .' >' . $dept_html['desc'][ $department->alias ] .'</div>';

			}
			else {

				$dept_html['desc'][ $department->alias ] = '';

			}

		}

		$this->assignRef( 'staff_html' 		 	 		 , $staff_html 				 	 );

		$this->assignRef( 'dept_html' 		 	 		 , $dept_html 				 	 );

		$this->assignRef( 'staff_name_color_html' 		 , $staff_name_color_html 		 );

		$this->assignRef( 'displayImage' 		 		 , $displayImage  		 		 );

		$this->assignRef( 'read_contact_class' 		 	 , $read_contact_class  		 );

		$this->assignRef( 'read_contact_label' 			 , $params->cl_read_contact 	 );

		$this->assignRef( 'staff_name_class' 			 , $staff_name_class 			 );

		$this->assignRef( 'staff_bio_color_html' 		 , $staff_bio_color_html 		 );

		$this->assignRef( 'staff_bio_class' 			 , $staff_bio_class  			 );

		$this->assignRef( 'staff_image_class' 			 , $staff_image_class 			 );

		$this->assignRef( 'page_title_color_html' 		 , $page_title_color_html 		 );

		$this->assignRef( 'staff_title_color_html' 		 , $staff_title_color_html 		 );

		$this->assignRef( 'dept_unique_foot_color_html'  , $dept_unique_foot_color_html  );

		$this->assignRef( 'dept_general_foot_color_html' , $dept_general_foot_color_html );

		$this->assignRef( 'staff_list'					 , $staff_list					 );

		$this->assignRef( 'departments_list'			 , $departments_list			 );

		$this->assignRef( 'params' 						 , $params 						 );

		$this->assignRef( 'show_sm_link' 	 			 , $show_sm_link			 	 );

		parent::display($tpl);
	}
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit