Пример #1
0
                    <div class="col-sm-12" id="note_panel">
                        <div class="panel panel-default">
                            <div class="panel-heading"><b>หมายเหตุ</b></div>
                            <div class="panel panel-body">
                                 <label for="note">รายละเอียด:</label>
                                 <textarea class="form-control" rows="5" id="note" name="note"></textarea>
                               
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="nameEn" id="nameEn" value="<?php 
echo flnameEn($uid);
?>
">
                    <input type="hidden" name="mailAdmin" id="mailAdmin" value="<?php 
echo mailAdmin();
?>
">
                    
                    <div class="col-sm-12">
                        <button type="submit" id="save" class="btn btn-success btn-lg col-md-12" style="folat:right" disabled>บันทึก</button>
                    </div>  
                </div><!--col-sm-10-->
            </div><!--row-->
            
            <div class="row">
                <div class="col-md-2"></div>
                <div class="col-md-10">
                    <?php 
include_once "footer_picker.php";
?>
Пример #2
0
            $c = nl2br(strip_tags($_POST['t']));
            $c = preg_replace('#(<br */?>\\s*)+#i', '<br />', $c);
            $g = getGravatar(strip_tags($_POST['e']));
            $a[] = array('e' => $key, 'n' => strip_tags($_POST['n']), 's' => $a1['vmel'] ? 0 : 1, 'd' => $t, 'u' => strip_tags($_POST['u']), 't' => $c, 'g' => $g, 'i' => $i);
            usort($a, 'sortDate');
            if (!$b) {
                $a1['mail'][$key] = strip_tags($_POST['e']);
                $a1['key'] = $key;
                $out = json_encode($a1);
                file_put_contents('../../data/_sdata-' . $sdata . '/commentMail.json', $out);
            }
            $out = json_encode($a);
            //
            if (file_put_contents('../../data/' . strip_tags($_POST['u']) . '/comment.json', $out)) {
                echo strip_tags($_POST['t']) . '<br /><strong>' . T_('Your comment is awaiting moderation.') . '</strong>';
                mailAdmin(T_('New Comment') . ' : ' . strip_tags($_POST['u']), strip_tags($_POST['n']) . '<br />' . $c, strip_tags($_POST['u']), $bottom, $top, $sdata);
                exit;
            }
            break;
            // ********************************************************************************************
    }
}
function sortDate($i, $j)
{
    return strcmp($i['d'], $j['d']);
}
function mailAdmin($tit, $body, $Ubusy, $bottom, $top, $sdata)
{
    $bottom = str_replace('[[unsubscribe]]', '&nbsp;', $bottom);
    $q = file_get_contents('../../data/' . $Ubusy . '/site.json');
    $a = json_decode($q, true);