Beispiel #1
0
$con = mysql_connect("62.149.150.129", "Sql436612", "b032f75c");
if (!$con) {
    die('Could not connect: ' . mysql_error());
}
// if
mysql_select_db("Sql436612_1", $con);
$que = "SELECT immobile.id, tipologia, via, numero_civico, comune, mq, prezzo, camere, immobile.descrizione, locazione FROM immobile INNER JOIN immagini ON immobile.id = immagini.id_immobile WHERE ";
//completa la query contenuta in $que, secondo certe parti condivise (dev'essere prima tra le altre parti della valorizzazione di $que)
include "pulizia.php";
$que = $que . " AND contratto = 'affitto' AND presentazione = '1'";
$result = mysql_query($que);
$prezzo_o_affitto = "Affitto mensile";
echo "initialize();\n";
$i = 0;
while ($row = mysql_fetch_array($result)) {
    $row = nltobr($row);
    $i++;
    echo "marcaIndirizzo(\"Italia " . $row['comune'] . " " . $row['via'] . " " . $row['numero_civico'] . "\",  \"";
    echo "<div style='cursor:pointer;width:400px;' id='cont" . $i . "' onclick='apri_pagina(" . $row['id'] . ")'>";
    echo "<h2>" . $row['tipologia'] . " - " . $row['comune'] . "</h2>" . "<img src='" . $row['locazione'] . "' class='immagine_casa'/>";
    echo "<strong>MQ: </strong>" . $row['mq'] . "<br />";
    echo "<strong>" . $prezzo_o_affitto . ": </strong>";
    if ($row['prezzo'] != 0.0) {
        echo $row['prezzo'];
    } else {
        echo "Trattativa riservata";
    }
    echo "<br />";
    echo "<strong>Locali: </strong>" . $row['camere'] . "<br />";
    echo $row['descrizione'];
    echo "</div>\");\n";
Beispiel #2
0
        echo '<div class="title">

<h2>' . $LANG['users_sendmail_title'] . '</h2>

<div style="float:right; margin: 0 2px 0 0;">
<a href="?route=users.php&amp;action=list" class="btn">' . $LANG['users_view'] . '</a>
</div>';
        if (!empty($LANG['users_sendmail_subtitle'])) {
            echo '<span>' . $LANG['users_sendmail_subtitle'] . '</span>';
        }
        echo '</div>';
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['csrf']) && check_csrf($_POST['csrf'], 'sendmail_csrf')) {
            if (!empty($_POST['fname']) && !empty($_POST['femail']) && !empty($_POST['temails']) && !empty($_POST['subject']) && !empty($_POST['text'])) {
                $suc = $err = 0;
                foreach (array_unique(array_filter(explode(',', $_POST['temails']))) as $email) {
                    if (\site\mail::send(trim($email), $_POST['subject'], array('template' => 'sendmail', 'path' => '../', 'from_email' => $_POST['femail'], 'from_name' => $_POST['fname'], 'reply_to' => $_POST['femail'], 'reply_name' => $_POST['fname']), array('text' => nltobr($_POST['text'])))) {
                        $suc++;
                    } else {
                        $err++;
                    }
                }
                if ($suc > $err) {
                    echo '<div class="a-success">' . sprintf($LANG['msg_mailssent'], $suc, $err) . '</div>';
                } else {
                    echo '<div class="a-error">' . sprintf($LANG['msg_mailssent'], $suc, $err) . '</div>';
                }
            } else {
                echo '<div class="a-error">' . $LANG['msg_error'] . '</div>';
            }
        }
        $csrf = $_SESSION['sendmail_csrf'] = \site\utils::str_random(10);
Beispiel #3
0
  <div style="clear:both;"></div>

  <div class="options">';
                if (empty($item->scope)) {
                    echo '<a href="?plugin=' . $item->main_file . '">' . $LANG['open'] . '</a>';
                }
                echo '<a href="?route=plugins.php&amp;action=edit&amp;id=' . $item->ID . '">' . $LANG['edit'] . '</a>';
                echo '<a href="' . \site\utils::update_uri('', array('type' => !$item->visible ? 'publish' : 'unpublish', 'id' => $item->ID, 'token' => $csrf)) . '">' . (!$item->visible ? $LANG['publish'] : $LANG['unpublish']) . '</a>';
                if (!empty($item->options_file)) {
                    echo '<a href="?plugin=' . $item->options_file . '">' . $LANG['options'] . '</a>';
                }
                echo '<a href="?route=plugins.php&amp;action=uninstall&amp;id=' . $item->ID . '">' . $LANG['plugins_uninstall'] . '</a>';
                if (!empty($item->description)) {
                    echo '<a href="javascript:void(0)" onclick="$(this).show_next( { after_action: \'\', element: \'div\' } ); return false;">' . $LANG['description'] . '</a>';
                    echo '<div style="display: none; margin: 10px 0; font-size: 12px;">' . nltobr($item->description) . '</div>';
                }
                echo '</div>
  </li>';
            }
            echo '</ul>

<input type="hidden" name="csrf" value="' . $csrf . '" />

</form>';
            if (isset($p['prev_page']) || isset($p['next_page'])) {
                echo '<div class="pagination">';
                if (isset($p['prev_page'])) {
                    echo '<a href="' . $p['prev_page'] . '" class="btn">' . $LANG['prev_page'] . '</a>';
                }
                if (isset($p['next_page'])) {
Beispiel #4
0
function Aff_bringback_form($Rid, $Author, $AuthorMail) {
    global $DEBUG,  $MAILMAINT, $post, $bringback, $TimeLife, $unit, $Cost, $Close;
    // Relecture de la demande
    list ($Sector, $Owner, $OwnerMail, $Author, $Building, $Room, $NumComp, $Mark, $Cat, $Os, $Content, $OpenTimeStamp, $NumBoost ) = read_task ($Rid);
    ### DEBUG ###
    if ($DEBUG) {
        echo "DEBUG  Aff_bringback_form >> $Rid, $Author, $AuthorMail<br>";
        echo "DEBUG  Source de la demande>> $Owner, $OwnerMail, $Author, $Content, $OpenTimeStamp<br>";
    }
    if ( !isset($post) ) {
        $html = "<form action='bring_back.php?Rid=$Rid&amp;jeton=".md5($_SESSION['token'].htmlentities('/Plugins/Maintenance/bring_back.php'))."' method='POST'>\n";
        $html .= "\t<div class='tableau tableint'>\n";
        $html .= "\t\t<div class='fieldcontainer'>\n";
        $html .= "\t\t\t<label for='bringback'>Texte du rapport :\n";
        $html .= "\t\t\t<textarea name='bringback' id='bringback' wrap='physical' rows='6' cols='100'></textarea>\n";
        $html .= "\t\t</div>\n";
        $html .="<table>";
        $html .= "<tr><td>Dur&eacute;e de l'intervention&nbsp;<input type='text' name='TimeLife' size='2' maxlength='2'>";
        $html .="&nbsp;<select name='unit'>\n<option>mn</option>\n<option>h</option>\n</select>\n</td>\n";
        $html .= "<td align='left'>Co&ucirc;t des pi&#232;ces de rechange&nbsp;<input type='text' name='Cost' size='4' maxlength='4'>&nbsp;&#8364;&nbsp;</td>\n";
        $html .= "<td align='left'>Cloturer l'intervention&nbsp;<input type='checkbox' name='Close' value='2'></td>\n";
        $html .= "</tr></table>\n";
        $html .= "\t\t</div>";
        $html .= "<div class='tableau tableint tablenul' style='text-align:center;'>";
        $html .= "<input type='submit' value='Poster' name='submit' class='button'/>\n";
        $html .= "<input type='hidden' value='true' name='post'/>\n";
        $html.='<input name="jeton" type="hidden"  value="'.md5($_SESSION['token'].htmlentities('/Plugins/Maintenance/bring_back.php')).'" />';
        $html .= "<input type='reset' value='Recommencer' name='reset' class='button'/>\n";
        $html .= "\t\t</div>";
        $html .= "</form>\n";
        echo $html;
    } else {
        // Mail du CR
        if ( $Close != 2 ) {
            $Subject = "[MaintInfo]CR demande d'intervention";
            $Close = "1";
        } else {
            $Subject = "[MaintInfo]Cloture demande d'intervention";
            // Determination de l'heure de cloture
            $CloseTimeStamp=strtotime (date("Y-m-d H:i:s"));
            // Cloture de l'intervention
            $requete = mysql_query("UPDATE maint_task SET Acq = '2', CloseTimeStamp=' $CloseTimeStamp' WHERE Rid = '$Rid'");
        }
        $Body = stripslashes($bringback)."\n---------------------------------------------------\n Votre demande :".$Content;
        mail_to ($OwnerMail, $MAILMAINT, $Subject, $Body, $AuthorMail);
        // Transfert du CR dans la table maint_task
        $TimeStamp=strtotime (date("Y-m-d H:i:s"));
        //Enregistrement de la demande
        if ($unit=='h') $TimeLife = $TimeLife*60;
        $result=mysql_query("INSERT INTO maint_thread (TopRid,Author,Content,TimeStamp,TimeLife, Cost)  VALUES ('$Rid','$Author','$bringback', '$TimeStamp', '$TimeLife', '$Cost')");
        // Reaffichage du CR
        $html = "<table class='tablecr'>\n";
        $html .="<tr>\n<td>\n";
        $html .= nltobr(stripslashes($bringback))."\n";
        $html .="</td>\n</tr>\n";
        $html .= "</table><br>\n";
        echo $html;
    }
}