نمایش نتایج: از شماره 1 تا 4 , از مجموع 4

موضوع: ارور در بخش های مخلتف IBSng

  1. #1
    عضو انجمن
    تاریخ عضویت
    Jan 2010
    نوشته ها
    344
    تشکر تشکر کرده 
    70
    تشکر تشکر شده 
    65
    تشکر شده در
    57 پست

    پیش فرض ارور در بخش های مخلتف IBSng

    با درود
    اسکریپت اکانتیگ من جدیدا مشکل پیدا کرده روی بعضی از گزینه ها کلیک میکنه ارور زیر را میدهید
    Fatal error: Call to undefined method AdminConnectionLogsReportCreator::getController() in /usr/local/IBSng/interface/IBSng/inc/generator/report_generator/report_creator.php on line 96

  2. # ADS




     

  3. #2
    عضو انجمن
    تاریخ عضویت
    Jan 2010
    نوشته ها
    344
    تشکر تشکر کرده 
    70
    تشکر تشکر شده 
    65
    تشکر شده در
    57 پست

    پیش فرض پاسخ : ارور در بخش های مخلتف IBSng

    کسی نیست کمک کنه

    کد:
    <?php
    
    /**
     * 
     * */
    
    require_once (IBSINC . "generator/creator.php");
    
    class ReportCreator extends Creator {
    	function ReportCreator() {
    		// initilized variables
    		$this->init();
    	}
    
    	function create() {
    		// Reports
    		$this->reports = array ();
    		if ($this->canShowReports())
    			$this->reports = &$this->getReports();
    
    		if ($this->getRegisteredValue("errorOccured"))
    			$this->generator = &$this->controller->getWebGenerator();
    		
    		else {
    			$this->generator = &$this->controller->getGenerator();
    			if (isset ($this->results))
    				$this->generator->results = &$this->results;
    
    			$this->doFormatting($this->generator);
    		}
    		$this->generator->creator = &$this;
    
    		// show information
    		$this->generator->dispose();
    	}
    
    	/**
    	 * formating report with Formatter($gen)
    	 * 
    	 * @param Generator $gen formatter
    	 * @param reports mixed object that must be formt
    	 * */
    	function doFormatting(&$gen)
    	{
    		foreach ($this->reports as $report)
    			/**
    			 * filtering $report
    			 * to get information that must be shown 
    			 * */
    			$gen->doArray($this->__getFilteredOutputReport($report));
    	}
    
    
    	/**
    	 * this method initializes variables
    	 * */
    	function init() {
    		parent :: init();
    		/**
    		 * variables of report creator
    		 * overiden variables store in __variables
    		 * 
    		 * @access private $__variables 
    		 * */
    		$this->__variables = array ();
    
    		// register informations
    		$this->register("formula_prefixes", array ());
    		$this->register("root_node_name", "report_root");
    		$this->register("inRequestVariable", "NotAssignedYet");
    		$this->register("errorOccured", FALSE);
    
    		// set smarty
    		$this->smarty = new IBSSmarty();
    
    		// collect conditions
    		$this->conds = &$this->collectConditions();
    
    		// get selectors (information that said which information 
    		// must be shown and which not)
    		$this->report_selectors = &$this->getReportSelectors();
    
    		// create controller
    		$this->controller = &$this->createController();
    
    		$this->output_generators_name = $this->controller->getOutputGeneratorsName();
    	}
    
    	/**
    	 * get & create controller
    	 * @return Controller
    	 * */
    	function createController() {
    		$controller = &$this->getController();
    	
    		$controller->setViewOuputSelectedName($this->getViewOuputSelectedName());
    
    		// set selectors for controller
    		$controller->setReportSelectors($this->report_selectors);
    
    		// set Smarty of controller
    		$controller->setSmarty($this->smarty);
    
    		return $controller;
    	}
    
    	/**
    	 * this method get result (one row of results) 
    	 * and return reported information(needed information for output viewing)
    	 * @param mixed $result given information
    	 * @return mixed needed information for reporting
    	 * */
    	function __getFilteredOutputReport($result_row) {
    		// filtering information
    		$report = array (
    			$this->getRegisteredValue("root_node_name") => $this->getReportInformationFromRow($result_row), 
    			"other" => $this->getUsefulInformation($result_row));
    		return $report;
    	}
    
    	/**
    	 * get viewing information from $log (filtering $log to get all needed information)
    	 * @access public
    	 * @return mixed reporeted log (any thing that needed for viewing)
    	 * */
    	function getReportInformationFromRow($row) {
    		$report_log = array ();
    
    		foreach ($this->report_selectors as $formual => $field_name) {
    			// cut substr that is finish with '|' from $field_name_index
    			if (($pos = strpos($field_name, "|")) !== false)
    				$field_name = substr($field_name, 0, $pos);
    
    			// get field value from log
    			$report_row = $this->getFieldFromRow($row, $field_name);
    
    			// cut first substr that is finish with ','
    			if (($pos = strpos($field_name, ",")) !== false)
    				$field_name = substr($field_name, 0, $pos);
    
    			// delete prefix from field_name.
    			// it contains any thing like this show__info_ 
    			$field_name = deletePrefixFromFormula($this->getRegisteredValue("formula_prefixes"), $field_name);
    
    			// collecting
    			$report_log[$field_name] = $report_row;
    		}
    
    		return $report_log;
    	}
    
    	/**
    	 * get value of field ($field_name_index) in object ($row_report)
    	 * @param mix $row_report
    	 * @param string $field_name_index like foo1,foo2,foo3
    	 * */
    	function getFieldFromRow($row_report, $field_name_index) {
    		$ret = array ();
    		// separate variables with ','
    		// foo1,foo2,foo3 => foo1 foo2 foo3
    		$field_name_indexs = explode(",", $field_name_index);
    
    		// get value of each field
    		foreach ($field_name_indexs as $field_name)
    			// get value of field
    			$ret[] = $this->getFieldValue($row_report, $field_name);
    
    		return implode(" ", $ret);
    	
    	}
    
    	/**
    	 * getting useful information
    	 * */
    	function getUsefulInformation($report) {
    		return array ();
    	}
    
    	/**
    	 * for any variable of REQUEST if it start with $selector_expression then is added to return array.
    	 * example :
    	 * 		getReportSelectors("show__") return an array that contains this variables 
    	 * 		"show__details_username", "show__derails_userid", ... that this variables come from
    	 * 		REQUEST.
    	 * 
    	 * @param string $begin_expression like this : show__details_ each var that start with this 
    	 * 		expression will be selected 
    	 * @return array 
    	 * */
    	function getReportSelectors($begin_expression) {
    		$selectors = array ();
    
    		// searching in REQUEST and find selectors each selector start with $selector_start
    		foreach ($_REQUEST as $field_name => $field_formula)
    			if (ereg("^" . $begin_expression . ".*", $field_formula))
    				$selectors[str_replace("_", " ", $field_name)] = $field_formula;
    
    		return $selectors;
    	}
    
    	/**
    	 * can I show results
    	 * @return boolean TRUE means that show result
    	 * */
    	function canShowReports() {
    		return isInRequest($this->getRegisteredValue("inRequestVariable"));
    	}
    
    	/**
    	 * example :
    	 *   register("inRequestVariable", "search")
    	 * 
    	 * register variable with it's value
    	 * @param string $var
    	 * @param mix $value value for $var
    	 * */
    	function register($var, $value) {
    		$this->variables[$var] = $value;
    	}
    
    	/**
    	 * get registered value of $var
    	 * 
    	 * TODO if it is possible throw an Exception when there is no variable associate for $var
    	 * @param string $var
    	 * @return mixed if there is no associated variable for $var return "NotAssignedValue"
    	 * */
    
    	function getRegisteredValue($var) {
    		if (isset ($this->variables[$var]) and !is_null($this->variables[$var]))
    			return $this->variables[$var];
    
    		toLog("Undefine property : " . $var . " you must overide this variable in drived class\n");
    		return "NotAssignedValue";
    	}
    
    	// TODO: Actually define the functions that should be overriden and do something if they aren't overrided
    	// TODO: Convert all variables to register style. It's ugly to override on every child
    
    	/*
    	 * this methods must be overrided
    	 * 
    	 * controller use this function to show output
    	 * function getViewOuputSelectedName()
    	 * 
    	 * 
    	 * which variable must be exist in REQUEST
    	 * for creating results
    	 * canShowReport will be used this function 
    	 * 
    	 * 
    	 * collect conditions
    	 * function collectConditions()
    	 * 
    	 * getting reports
    	 * @return mixed
    	 * function getReports()
    	 * 
    	 * get controller
    	 * @return Controller
    	 * function getController()
    	 * 
    	 * get Report Selectors
    	 * @return mixed selectors
    	 * function getReportSelectors()
    	 * 
    	 * get value of field
    	 * @param mixed $row_report
    	 * @param string $attribute_name name of attribute
    	 * function getFieldValue($row_report, $attribute_name)
    	 *
    	 * 
    	 * $formala_prefixes array of prefixes
    	 * for deleting prefix of one formula
    	 * show__details__formula_name == deleting==> formaula_name
    	 * it is used for deletePrefixFromFormula($this->formula_prefixes, $formula_name)
    	 *  
    	 * 
    	 * which variable must be exist in request
    	 * for creating result 
    	 * string inRequestVariable
    	 *
    	 * */
    
    }
    ?>

  4. #3
    عضو انجمن hiwebpw آواتار ها
    تاریخ عضویت
    Jan 2017
    محل سکونت
    Guilan
    نوشته ها
    114
    تشکر تشکر کرده 
    23
    تشکر تشکر شده 
    71
    تشکر شده در
    60 پست

    پیش فرض پاسخ : ارور در بخش های مخلتف IBSng

    اطلاعات ارسال کنید بررسی بشه

  5. #4
    عضو انجمن hosinaa آواتار ها
    تاریخ عضویت
    Jan 2012
    محل سکونت
    ACHOST.NET
    نوشته ها
    160
    تشکر تشکر کرده 
    569
    تشکر تشکر شده 
    1,223
    تشکر شده در
    910 پست

    پیش فرض پاسخ : ارور در بخش های مخلتف IBSng

    درود
    در امضا مشخصات هست تیکت بفرمائید تا همکاران راهنمایتان کنند.
    VPS ,Dedicated , Colocation , Hosting , VOIP, SSL ۩
    9101-0401[051] @ACHOST ۩



اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. پاسخ ها: 0
    آخرين نوشته: October 9th, 2017, 22:34
  2. پاسخ ها: 0
    آخرين نوشته: January 27th, 2015, 13:37
  3. assign IP to user on IBSng / اختصاص دادن آی پی به کاربر در IBSng
    توسط master_vpn در انجمن اسکریپت های دیگر
    پاسخ ها: 11
    آخرين نوشته: February 14th, 2013, 22:18

کلمات کلیدی این موضوع

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •