当前位置: 首页>>代码示例>>PHP>>正文


PHP dol_strlen函数代码示例

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


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

示例1: create

  /**
   *    \brief  Insere le produit en base
   *    \param  user utilisateur qui effectue l'insertion
   */

  function create($user)
    {
      if (dol_strlen(trim($this->numero)) && dol_strlen(trim($this->intitule)))
	{
	  $sql = "SELECT count(*)";
	  $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux ";
	  $sql .= " WHERE numero = '" .trim($this->numero)."'";

	  $resql = $this->db->query($sql) ;

	  if ( $resql )
	    {
	      $row = $this->db->fetch_array($resql);
	      if ($row[0] == 0)
		{
		  $sql = "INSERT INTO ".MAIN_DB_PREFIX."compta_compte_generaux (date_creation, fk_user_author, numero,intitule)";
		  $sql .= " VALUES (".$this->db->idate(mktime()).",".$user->id.",'".$this->numero."','".$this->intitule."')";

		  $resql = $this->db->query($sql);
		  if ( $resql )
		    {
		      $id = $this->db->last_insert_id(MAIN_DB_PREFIX."compta_compte_generaux");

		      if ($id > 0)
			{
			  $this->id = $id;
			  $result = 0;
			}
		      else
			{
			  $result = -2;
			  dol_syslog("ComptaCompte::Create Erreur $result lecture ID");
			}
		    }
		  else
		    {
		      $result = -1;
		      dol_syslog("ComptaCompte::Create Erreur $result INSERT Mysql");
		    }
		}
	      else
		{
		  $result = -3;
		  dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
		}
	    }
	  else
	    {
	      $result = -5;
	      dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
	    }
	}
      else
	{
	  $result = -4;
	  dol_syslog("ComptaCompte::Create Erreur  $result Valeur Manquante");
	}

      return $result;
    }
开发者ID:remyyounes,项目名称:dolibarr,代码行数:65,代码来源:comptacompte.class.php

示例2: getGeoCoordinatesOfAddress

	/**
	 *  \brief      Return geo coordinates of an address
	 *  \param      address		Address
	 * 							Example: 68 Grande rue Charles de Gaulle,+94130,+Nogent sur Marne,+France
	 *							Example: 188, rue de Fontenay,+94300,+Vincennes,+France
	 *	\return		string		Coordinates
	 */
	function getGeoCoordinatesOfAddress($address)
	{
		global $conf;


		$i=0;

		// Desired address
		$urladdress = "http://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".$this->key;

		// Retrieve the URL contents
		$page = file_get_contents($urladdress);

		$code = strstr($page, '<coordinates>');
		$code = strstr($code, '>');
		$val=strpos($code, "<");
		$code = substr($code, 1, $val-1);
		//print $code;
		//print "<br>";
		$latitude = substr($code, 0, strpos($code, ","));
		$longitude = substr($code, strpos($code, ",")+1, dol_strlen(strpos($code, ","))-3);

		// Output the coordinates
		//echo "Longitude: $longitude ',' Latitude: $latitude";

		$i++;
	}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:34,代码来源:google.class.php

示例3: loadBox

 /**
  * Load data into info_box_contents array to show array later.
  *
  * @param int $max of records to load
  *
  * @return void
  */
 public function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     dol_include_once('/lead/class/lead.class.php');
     $lead = new Lead($db);
     $lead->fetch_all('DESC', 't.date_closure', $max, 0, array('t.date_closure<' => dol_now()));
     $text = $langs->trans("LeadLate", $max);
     $this->info_box_head = array('text' => $text, 'limit' => dol_strlen($text));
     $i = 0;
     foreach ($lead->lines as $line) {
         // FIXME: line is an array, not an object
         $line->fetch_thirdparty();
         // Ref
         $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => dol_buildpath('/lead/lead/card.php', 1) . '?id=' . $line->id);
         $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $line->ref, 'url' => dol_buildpath('/lead/lead/card.php', 1) . '?id=' . $line->id);
         $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $line->fk_soc);
         $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($line->thirdparty->name, 40), 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $line->fk_soc);
         // Amount Guess
         $this->info_box_contents[$i][4] = array('td' => 'align="left"', 'text' => price($line->amount_prosp, 'HTML') . $langs->getCurrencySymbol($conf->currency));
         // Amount real
         $this->info_box_contents[$i][5] = array('td' => 'align="left"', 'text' => $line->getRealAmount() . $langs->getCurrencySymbol($conf->currency));
         $i++;
     }
 }
开发者ID:ndrosis,项目名称:lead,代码行数:32,代码来源:box_lead.php

示例4: loadBox

 /**
  * Load data into info_box_contents array to show array later.
  *
  * 	@param		int		$max		Maximum number of records to load
  * 	@return		void
  */
 public function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     //include_once DOL_DOCUMENT_ROOT . "/mymodule/class/mymodule.class.php";
     $text = $langs->trans("MyBoxDescription", $max);
     $this->info_box_head = array('text' => $text, 'limit' => dol_strlen($text));
     $this->info_box_contents[0][0] = array('td' => 'align="left"', 'text' => $langs->trans("MyBoxContent"));
 }
开发者ID:atm-robin,项目名称:kelio,代码行数:15,代码来源:kelio_box.php

示例5: loadBox

 /**
  *  Load data for box to show them later
  *
  *  @param   int		$max        Maximum number of records to load
  *  @return  void
  */
 function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     $totalMnt = 0;
     $totalnb = 0;
     $totalnbTask = 0;
     $textHead = $langs->trans("Projects");
     $this->info_box_head = array('text' => $textHead, 'limit' => dol_strlen($textHead));
     // list the summary of the orders
     if ($user->rights->projet->lire) {
         $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
         $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p";
         $sql .= " WHERE p.entity = " . $conf->entity;
         $sql .= " AND p.fk_statut = 1";
         // Seulement les projets ouverts
         $sql .= " ORDER BY p.datec DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $i = 0;
             while ($i < $num) {
                 $objp = $db->fetch_object($result);
                 $tooltip = $langs->trans('Project') . ': ' . $objp->ref;
                 $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'object_project', 'tooltip' => $tooltip, 'url' => DOL_URL_ROOT . "/projet/card.php?id=" . $objp->rowid);
                 $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref, 'tooltip' => $tooltip, 'url' => DOL_URL_ROOT . "/projet/card.php?id=" . $objp->rowid);
                 $this->info_box_contents[$i][2] = array('td' => 'align="left"', 'text' => $objp->title);
                 $sql = "SELECT count(*) as nb, sum(progress) as totprogress";
                 $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p LEFT JOIN " . MAIN_DB_PREFIX . "projet_task as pt on pt.fk_projet = p.rowid";
                 $sql .= " WHERE p.entity = " . $conf->entity;
                 $sql .= " AND p.rowid = " . $objp->rowid;
                 $resultTask = $db->query($sql);
                 if ($resultTask) {
                     $objTask = $db->fetch_object($resultTask);
                     $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format($objTask->nb, 0, ',', ' ') . "&nbsp;" . $langs->trans("Tasks"));
                     if ($objTask->nb > 0) {
                         $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => number_format($objTask->totprogress / $objTask->nb, 0, ',', ' ') . "%");
                     } else {
                         $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A&nbsp;");
                     }
                     $totalnbTask += $objTask->nb;
                 } else {
                     $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format(0, 0, ',', ' '));
                     $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A&nbsp;");
                 }
                 $i++;
             }
         }
     }
     // Add the sum à the bottom of the boxes
     $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => "&nbsp;");
     $this->info_box_contents[$i][1] = array('td' => '', 'text' => $langs->trans("Total") . "&nbsp;" . $textHead, 'text' => "&nbsp;");
     $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($num, 0, ',', ' ') . "&nbsp;" . $langs->trans("Projects"));
     $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => number_format($totalnbTask, 0, ',', ' ') . "&nbsp;" . $langs->trans("Tasks"));
     $this->info_box_contents[$i][4] = array('td' => '', 'text' => "&nbsp;");
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:63,代码来源:box_project.php

示例6: supplier_invoice_pdf_create

/**
 *		Create object on disk
 *		@param	    db  			objet base de donnee
 *		@param	    object			object supplier invoice
 *		@param	    model			force le modele a utiliser ('' to not force)
 *		@param		outputlangs		objet lang a utiliser pour traduction
 *      @return     int         	0 si KO, 1 si OK
 */
function supplier_invoice_pdf_create($db, $object, $model, $outputlangs)
{
	global $conf, $langs;

	$langs->load("suppliers");

	$dir = DOL_DOCUMENT_ROOT."/includes/modules/supplier_invoice/pdf/";

	// Positionne modele sur le nom du modele de invoice fournisseur a utiliser
	if (! dol_strlen($model))
	{
		if (! empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF))
		{
			$model = $conf->global->INVOICE_SUPPLIER_ADDON_PDF;
		}
		else
		{
		    $model = 'canelle';
			//print $langs->trans("Error")." ".$langs->trans("Error_INVOICE_SUPPLIER_ADDON_PDF_NotDefined");
			//return 0;
		}
	}
	// Charge le modele
	$file = "pdf_".$model.".modules.php";
	if (file_exists($dir.$file))
	{
		$classname = "pdf_".$model;
		require_once($dir.$file);

		$obj = new $classname($db,$object);

		// We save charset_output to restore it because write_file can change it if needed for
		// output format that does not support UTF8.
		$sav_charset_output=$outputlangs->charset_output;
		if ($obj->write_file($object,$outputlangs) > 0)
		{
			// on supprime l'image correspondant au preview
			supplier_invoice_delete_preview($db, $object->id);

			$outputlangs->charset_output=$sav_charset_output;
			return 1;
		}
		else
		{
			$outputlangs->charset_output=$sav_charset_output;
			dol_syslog("Erreur dans supplier_invoice_pdf_create");
			dol_print_error($db,$obj->error);
			return 0;
		}
	}
	else
	{
		print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file);
		return 0;
	}
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:64,代码来源:modules_facturefournisseur.php

示例7: members_label_pdf_create

/**
 *	\brief   	Cree un fichier de cartes de visites en fonction du modele de ADHERENT_CARDS_ADDON_PDF
 *	\param   	db  			objet base de donnee
 *	\param   	id				id de la facture a creer
 *	\param	    message			message
 *	\param	    modele			force le modele a utiliser ('' to not force)
 *	\param		outputlangs		objet lang a utiliser pour traduction
 *	\return  	int        		<0 if KO, >0 if OK
 */
function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs)
{
	global $conf,$langs;
	$langs->load("members");

	$dir = DOL_DOCUMENT_ROOT . "/includes/modules/member/labels/";

	// Positionne modele sur le nom du modele a utiliser
	if (! dol_strlen($modele))
	{
		if ($conf->global->ADHERENT_ETIQUETTE_TYPE)
		{
			$modele = $conf->global->ADHERENT_ETIQUETTE_TYPE;
			$code = $conf->global->ADHERENT_ETIQUETTE_TYPE;
		}
		else
		{
		    $modele = 'L7163';
		    $code = 'L7163';
		}
	}
    $modele='standardlabel';

	// Charge le modele
	$file = "pdf_".$modele.".class.php";
	if (file_exists($dir.$file))
	{
		$classname = "pdf_".$modele;
		require_once($dir.$file);

		$obj = new $classname($db);

		// We save charset_output to restore it because write_file can change it if needed for
		// output format that does not support UTF8.
		$sav_charset_output=$outputlangs->charset_output;
		if ($obj->write_file($arrayofmembers, $outputlangs) > 0)
		{
			$outputlangs->charset_output=$sav_charset_output;
			return 1;
		}
		else
		{
			$outputlangs->charset_output=$sav_charset_output;
			dol_print_error($db,"members_card_pdf_create Error: ".$obj->error);
			return -1;
		}
	}

	else
	{
		dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file));
		return -1;
	}


}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:65,代码来源:modules_labels.php

示例8: dol_decode

/**
 *	Decode a base 64 encoded + specific string.
 *  This function is called by filefunc.inc.php at each page call.
 *	Code of this function is useless and we should use base64_decode only instead
 *
 *	@param   string		$chain		string to decode
 *	@return  string					decoded string
 */
function dol_decode($chain)
{
    $chain = base64_decode($chain);
    $strlength = dol_strlen($chain);
    for ($i = 0; $i < $strlength; $i++) {
        $output_tab[$i] = chr(ord(substr($chain, $i, 1)) - 17);
    }
    $string_decoded = implode("", $output_tab);
    return $string_decoded;
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:18,代码来源:security.lib.php

示例9: chequereceipt_pdf_create

/**
 *	\brief   	Cree un bordereau remise de cheque
 *	\param   	db  			objet base de donnee
 *	\param   	id				Object invoice (or id of invoice)
 *	\param	    message			message
 *	\param	    modele			force le modele a utiliser ('' to not force)
 *	\param		outputlangs		objet lang a utiliser pour traduction
 *	\return  	int        		<0 if KO, >0 if OK
 * 	TODO
 */
function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
{
	global $conf,$langs;
	$langs->load("bills");

	$dir = DOL_DOCUMENT_ROOT . "/includes/modules/cheque/pdf/";

	// Positionne modele sur le nom du modele a utiliser
	if (! dol_strlen($modele))
	{
		if ($conf->global->FACTURE_ADDON_PDF)
		{
			$modele = $conf->global->FACTURE_ADDON_PDF;
		}
		else
		{
			//print $langs->trans("Error")." ".$langs->trans("Error_FACTURE_ADDON_PDF_NotDefined");
			//return 0;
			$modele = 'crabe';
		}
	}

	// Charge le modele
	$file = "pdf_".$modele.".modules.php";
	if (file_exists($dir.$file))
	{
		$classname = "pdf_".$modele;
		require_once($dir.$file);

		$obj = new $classname($db);
		$obj->message = $message;

		// We save charset_output to restore it because write_file can change it if needed for
		// output format that does not support UTF8.
		$sav_charset_output=$outputlangs->charset_output;
		if ($obj->write_file($id, $outputlangs) > 0)
		{
			$outputlangs->charset_output=$sav_charset_output;
			return 1;
		}
		else
		{
			$outputlangs->charset_output=$sav_charset_output;
			dol_print_error($db,"facture_pdf_create Error: ".$obj->error);
			return -1;
		}

	}
	else
	{
		dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file));
		return -1;
	}
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:64,代码来源:modules_chequereceipts.php

示例10: cryptCookie

 /**
  * Encrypt en create the cookie
  *
  * @return	void
  */
 function cryptCookie()
 {
     if (!empty($this->myKey)) {
         $valuecrypt = base64_encode($this->myValue);
         $max = dol_strlen($valuecrypt) - 1;
         for ($f = 0; $f <= $max; $f++) {
             $this->cookie .= intval(ord($valuecrypt[$f])) * $this->myKey . "|";
         }
     } else {
         $this->cookie = $this->myValue;
     }
     setcookie($this->myCookie, $this->cookie, $this->myExpire, $this->myPath, $this->myDomain, $this->mySecure);
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:18,代码来源:cookie.class.php

示例11: make_alpha_from_numbers

/**
 *
 */
function make_alpha_from_numbers($number)
{
	$numeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	if($number<dol_strlen($numeric))
	{
		return $numeric[$number];
	}
	else
	{
		$dev_by = floor($number/dol_strlen($numeric));
		return "" . make_alpha_from_numbers($dev_by-1) . make_alpha_from_numbers($number-($dev_by*dol_strlen($numeric)));
	}
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:16,代码来源:viewfiles.lib.php

示例12: loadBox

 /**
  *  Load data for box to show them later
  *
  *  @param  int     $max        Maximum number of records to load
  *  @return void
  */
 function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     $totalMnt = 0;
     $totalnb = 0;
     $totalDuree = 0;
     include_once DOL_DOCUMENT_ROOT . "/projet/class/task.class.php";
     $taskstatic = new Task($db);
     $textHead = $langs->trans("Tasks") . "&nbsp;" . date("Y");
     $this->info_box_head = array('text' => $textHead, 'limit' => dol_strlen($textHead));
     // list the summary of the orders
     if ($user->rights->projet->lire) {
         // FIXME fk_statut on a task is not be used. We use the percent. This means this box is useless.
         $sql = "SELECT pt.fk_statut, count(DISTINCT pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
         $sql .= " FROM " . MAIN_DB_PREFIX . "projet_task as pt, " . MAIN_DB_PREFIX . "projet_task_time as ptt";
         $sql .= " WHERE pt.datec BETWEEN '" . $this->db->idate(dol_get_first_day(date("Y"), 1)) . "' AND '" . $this->db->idate(dol_get_last_day(date("Y"), 12)) . "'";
         $sql .= " AND pt.rowid = ptt.fk_task";
         $sql .= " GROUP BY pt.fk_statut ";
         $sql .= " ORDER BY pt.fk_statut DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $i = 0;
             while ($i < $num) {
                 $objp = $db->fetch_object($result);
                 $this->info_box_contents[$i][] = array('td' => 'align="left"', 'text' => $langs->trans("Task") . " " . $taskstatic->LibStatut($objp->fk_statut, 0));
                 $this->info_box_contents[$i][] = array('td' => 'align="right"', 'text' => $objp->nb . "&nbsp;" . $langs->trans("Tasks"), 'url' => DOL_URL_ROOT . "/projet/tasks/list.php?leftmenu=projects&viewstatut=" . $objp->fk_statut);
                 $totalnb += $objp->nb;
                 $this->info_box_contents[$i][] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->plannedtot, 'all', 25200, 5));
                 $totalplannedtot += $objp->plannedtot;
                 $this->info_box_contents[$i][] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->durationtot, 'all', 25200, 5));
                 $totaldurationtot += $objp->durationtot;
                 $this->info_box_contents[$i][] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut, 3));
                 $i++;
             }
         } else {
             dol_print_error($this->db);
         }
     }
     // Add the sum à the bottom of the boxes
     $this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => 'align="left"', 'text' => $langs->trans("Total") . "&nbsp;" . $textHead);
     $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ') . "&nbsp;" . $langs->trans("Tasks"));
     $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot, 'all', 25200, 5));
     $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot, 'all', 25200, 5));
     $this->info_box_contents[$i][] = array('td' => '', 'text' => "");
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:54,代码来源:box_task.php

示例13: loadBox

 /**
  *  Load data for box to show them later
  *
  *  @param  int     $max        Maximum number of records to load
  *  @return void
  */
 function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     $totalMnt = 0;
     $totalnb = 0;
     $totalDuree = 0;
     include_once DOL_DOCUMENT_ROOT . "/projet/class/task.class.php";
     $taskstatic = new Task($db);
     $textHead = $langs->trans("Tasks") . "&nbsp;" . date("Y");
     $this->info_box_head = array('text' => $textHead, 'limit' => dol_strlen($textHead));
     // list the summary of the orders
     if ($user->rights->projet->lire) {
         $sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
         $sql .= " FROM " . MAIN_DB_PREFIX . "projet_task as pt, " . MAIN_DB_PREFIX . "projet_task_time as ptt";
         $sql .= " WHERE DATE_FORMAT(pt.datec,'%Y') = '" . date("Y") . "' ";
         $sql .= " AND pt.rowid = ptt.fk_task";
         $sql .= " GROUP BY pt.fk_statut ";
         $sql .= " ORDER BY pt.fk_statut DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $i = 0;
             while ($i < $num) {
                 $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'object_projecttask');
                 $objp = $db->fetch_object($result);
                 $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $langs->trans("Task") . "&nbsp;" . $taskstatic->LibStatut($objp->fk_statut, 0));
                 $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => $objp->nb . "&nbsp;" . $langs->trans("Tasks"), 'url' => DOL_URL_ROOT . "/projet/tasks/index.php?leftmenu=projects&viewstatut=" . $objp->fk_statut);
                 $totalnb += $objp->nb;
                 $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->plannedtot, 'all', 25200, 5));
                 $totalplannedtot += $objp->plannedtot;
                 $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->durationtot, 'all', 25200, 5));
                 $totaldurationtot += $objp->durationtot;
                 $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut, 3));
                 $i++;
             }
         }
     }
     // Add the sum à the bottom of the boxes
     $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left"', 'text' => $langs->trans("Total") . "&nbsp;" . $textHead);
     $this->info_box_contents[$i][1] = array('td' => '', 'text' => "");
     $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ') . "&nbsp;" . $langs->trans("Tasks"));
     $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot, 'all', 25200, 5));
     $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot, 'all', 25200, 5));
     $this->info_box_contents[$i][5] = array('td' => '', 'text' => "");
 }
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:53,代码来源:box_task.php

示例14: natural_search

 if ($sref) {
     $sql .= natural_search('p.ref', $sref);
 }
 if ($snom) {
     $sql .= natural_search('p.label', $snom);
 }
 if ($sbarcode) {
     $sql .= natural_search('p.barcode', $sbarcode);
 }
 if (isset($tosell) && dol_strlen($tosell) > 0 && $tosell != -1) {
     $sql .= " AND p.tosell = " . $db->escape($tosell);
 }
 if (isset($tobuy) && dol_strlen($tobuy) > 0 && $tobuy != -1) {
     $sql .= " AND p.tobuy = " . $db->escape($tobuy);
 }
 if (dol_strlen($canvas) > 0) {
     $sql .= " AND p.canvas = '" . $db->escape($canvas) . "'";
 }
 if ($catid > 0) {
     $sql .= " AND cp.fk_categorie = " . $catid;
 }
 if ($catid == -2) {
     $sql .= " AND cp.fk_categorie IS NULL";
 }
 if ($search_categ > 0) {
     $sql .= " AND cp.fk_categorie = " . $db->escape($search_categ);
 }
 if ($search_categ == -2) {
     $sql .= " AND cp.fk_categorie IS NULL";
 }
 if ($fourn_id > 0) {
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:list.php

示例15: if

			{
				$filelist[]=$file;
			}
			else if (preg_match('/'.$to.'/i',$file))	// First test may be false if we migrate from x.y.* to x.y.*
			{
				$filelist[]=$file;
			}
		}

		# Boucle sur chaque fichier
		foreach($filelist as $file)
		{
			print '<tr><td nowrap>';
			print $langs->trans("ChoosedMigrateScript").'</td><td align="right">'.$file.'</td></tr>'."\n";

			$name = substr($file, 0, dol_strlen($file) - 4);

			// Run sql script
			$ok=run_sql($dir.$file, 0, '', 1);
		}
	}

	print '</table>';

	if ($db->connected) $db->close();
}


if (empty($actiondone))
{
    print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:upgrade.php


注:本文中的dol_strlen函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。