clean indent

This commit is contained in:
Frédéric FRANCE 2019-10-27 08:50:32 +01:00
parent 2cce624623
commit 5006001753
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
17 changed files with 199 additions and 185 deletions

View File

@ -65,21 +65,33 @@ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
$i++;
}
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
}
} else { print "err"; }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
}
} else { print "err"; }

View File

@ -411,34 +411,34 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY))
print '<tr class="oddeven">';
print '<td width="80%">' . $langs->trans("DONATION_ART200") . '</td>';
print '<td class="center">';
if ($conf->use_javascript_ajax) {
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('DONATION_ART200');
} else {
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("DONATION_ART200", $arrval, $conf->global->DONATION_ART200);
}
}
print '</td></tr>';
print '<tr class="oddeven">';
print '<td width="80%">' . $langs->trans("DONATION_ART238") . '</td>';
print '<td class="center">';
if ($conf->use_javascript_ajax) {
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('DONATION_ART238');
} else {
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("DONATION_ART238", $arrval, $conf->global->DONATION_ART238);
}
}
print '</td></tr>';
print '<tr class="oddeven">';
print '<td width="80%">' . $langs->trans("DONATION_ART885") . '</td>';
print '<td class="center">';
if ($conf->use_javascript_ajax) {
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('DONATION_ART885');
} else {
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("DONATION_ART885", $arrval, $conf->global->DONATION_ART885);
}
}
print '</td></tr>';
print "</table>\n";
}

View File

@ -532,12 +532,12 @@ if (! empty($id) && $action == 'edit')
print "</td>";
print "</tr>\n";
if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) {
if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) {
$company=new Societe($db);
$result=$company->fetch($object->socid);
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
} else {
} else {
$langs->load("companies");
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="maxwidth200" value="'.dol_escape_htmltag($object->societe).'"></td></tr>';
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="maxwidth200" value="'.dol_escape_htmltag($object->lastname).'"></td></tr>';
@ -555,11 +555,13 @@ if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global
// Country
print '<tr><td class="titlefieldcreate">'.$langs->trans('Country').'</td><td>';
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code), 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print '</td></tr>';
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
}
}
// Payment mode
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
if ($object->modepaymentid) $selected = $object->modepaymentid;
@ -642,8 +644,9 @@ if (! empty($id) && $action != 'edit')
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
@ -692,16 +695,16 @@ if (! empty($id) && $action != 'edit')
print yn($object->public);
print '</td></tr>';
if ($object->socid) {
if ($object->socid) {
$company=new Societe($db);
$result=$company->fetch($object->socid);
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
} else {
} else {
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$object->societe.'</td></tr>';
print '<tr><td>'.$langs->trans("Lastname").'</td><td colspan="2">'.$object->lastname.'</td></tr>';
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="2">'.$object->firstname.'</td></tr>';
}
}
// Payment mode
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";

View File

@ -124,8 +124,9 @@ if ($object->id)
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -79,8 +79,9 @@ if (! empty($conf->projet->enabled))
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -95,8 +95,9 @@ if ($id > 0 || ! empty($ref))
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -18,11 +18,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
?>
<!-- BEGIN PHP TEMPLATE -->
<?php
print "<!-- BEGIN PHP TEMPLATE -->\n";
global $user;
global $noMoreLinkedObjectBlockAfter;
@ -32,26 +29,25 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("donations");
$total=0; $ilink=0;
$total=0;
$ilink=0;
foreach($linkedObjectBlock as $key => $objectlink) {
$ilink++;
$trclass='oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?>
<tr class="<?php echo $trclass; ?>">
<td><?php echo $langs->trans("Donation"); ?></td>
<td><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="center"><?php echo $objectlink->ref_client; ?></td>
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
<td class="right"><?php
print '<tr class="'.$trclass.'">';
print '<td>'.$langs->trans("Donation").'</td>';
print '<td>'.$objectlink->getNomUrl(1).'</td>';
print '<td class="center">'.$objectlink->ref_client.'</td>';
print '<td class="center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="right">';
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
} ?>
</td>
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
</tr>
<?php
}
print '</td>';
print '<td class="right">'.$objectlink->getLibStatut(3).'</td>';
print '</tr>';
if (count($linkedObjectBlock) > 1)
{
@ -67,6 +63,5 @@ if (count($linkedObjectBlock) > 1)
</tr>
<?php
}
?>
<!-- END PHP TEMPLATE -->
print "<!-- END PHP TEMPLATE -->\n";

View File

@ -277,14 +277,14 @@ if (empty($action) || $action == 'delete_section')
print load_fiche_titre($langs->trans("ECMSectionOfDocuments"));
print '<br>';
/*
/*
$ecmdir->ref=$ecmdir->label;
print $langs->trans("ECMSection").': ';
print img_picto('','object_dir').' ';
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php">'.$langs->trans("ECMRoot").'</a>';
//print ' -> <b>'.$ecmdir->getNomUrl(1).'</b><br>';
print "<br><br>";
*/
*/
// Confirmation de la suppression d'une ligne categorie
if ($action == 'delete_section')

View File

@ -401,7 +401,7 @@ if ($action != 'edit')
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&section='.urlencode($section).'&urlfile='.urlencode($urlfile).'">'.$langs->trans('Edit').'</a>';
}
/*
/*
if ($user->rights->ecm->setup)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=delete_file&section='.$section.'&urlfile='.urlencode($urlfile).'">'.$langs->trans('Delete').'</a>';
@ -410,7 +410,7 @@ if ($action != 'edit')
{
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Delete').'</a>';
}
*/
*/
print '</div>';
}

View File

@ -1886,11 +1886,12 @@ class EmailCollector extends CommonObject
// BODY
$s = imap_fetchstructure($mbox, $mid);
if (!$s->parts) // simple
if (!$s->parts) {
// simple
$this->getpart($mbox, $mid, $s, 0); // pass 0 as part-number
else { // multipart: cycle through each part
foreach ($s->parts as $partno0=>$p)
{
} else {
// multipart: cycle through each part
foreach ($s->parts as $partno0 => $p) {
$this->getpart($mbox, $mid, $p, $partno0+1);
}
}