コード例 #1
0
ファイル: adminedito.php プロジェクト: npds/npds_dune
                fclose($fp);
            }
        } elseif ($edito_type == 'M') {
            if (file_exists('static/edito_membres.txt')) {
                $fp = fopen('static/edito_membres.txt', 'r');
                if (filesize('static/edito_membres.txt') > 0) {
                    $Xcontents = fread($fp, filesize('static/edito_membres.txt'));
                }
                fclose($fp);
            }
        }
        $Xcontents = preg_replace('#<!--|/-->#', '', $Xcontents);
        if ($Xcontents == '') {
            $Xcontents = 'Edito ...';
        } else {
            $ibid = strstr($Xcontents, 'aff_jours');
            parse_str($ibid);
        }
        if ($aff_jours) {
            $Xcontents = substr($Xcontents, 0, strpos($Xcontents, 'aff_jours'));
        } else {
            $aff_jours = 20;
            $aff_jour = 'checked="checked"';
            $aff_nuit = 'checked="checked"';
        }
        edito($edito_type, $Xcontents, $aff_jours, $aff_jour, $aff_nuit);
        break;
    default:
        edito('', '', '', '', '');
        break;
}
コード例 #2
0
ファイル: adminedito.php プロジェクト: Jireck-npds/npds_dune
                fclose($fp);
            }
        } elseif ($edito_type == 'M') {
            if (file_exists("static/edito_membres.txt")) {
                $fp = fopen("static/edito_membres.txt", "r");
                if (filesize("static/edito_membres.txt") > 0) {
                    $Xcontents = fread($fp, filesize("static/edito_membres.txt"));
                }
                fclose($fp);
            }
        }
        $Xcontents = preg_replace('#<!--|/-->#', '', $Xcontents);
        if ($Xcontents == '') {
            $Xcontents = "Edito ...";
        } else {
            $ibid = strstr($Xcontents, "aff_jours");
            parse_str($ibid);
        }
        if ($aff_jours) {
            $Xcontents = substr($Xcontents, 0, strpos($Xcontents, "aff_jours"));
        } else {
            $aff_jours = 20;
            $aff_jour = 'checked="checked"';
            $aff_nuit = 'checked="checked"';
        }
        edito($edito_type, $Xcontents, $aff_jours, $aff_jour, $aff_nuit);
        break;
    default:
        edito("", "", "", "", "");
        break;
}
コード例 #3
0
ファイル: pageone.php プロジェクト: elixvey/mobilebdt
<?php

define("RelativePathTop", "../../libs/top/");
include RelativePathTop . "top_lib.php";
$page = "<div align=\"center\">{pageone}</div>\n         <a id=\"link_page2\" href=\"#pagetwo\">Identifiez vous</a>";
$edito = edito();
$part1 = extrait($edito, '<table cellpadding', '</table>');
$val = extrait($edito, 'getElementById("prochmatch', ';');
preg_match('#value=\'([0-9]*)([^0-9]*)([0-9]*)([^0-9]*)([0-9]*)([^0-9]*)([0-9]*)([^0-9]*)([0-9]*)#', $val, $match);
$date = padLeft($match[1]) . " / " . padLeft($match[3]) . " / " . padLeft($match[5]) . " " . padLeft($match[7]) . ":" . padLeft($match[9]);
$part2 = '<script type="text/javascript">document.getElementById("prochmatch").value=\'' . $date . '\';</script>';
$part3 = str_replace('<marquee ', '<marquee style="width: 400px;" ', extrait($edito, '<marquee', '</marquee>'));
$part3 = str_replace('marquee ', 'div', $part3);
$contenu = $part1 . $part2 . $part3;
$contenu = str_replace('style="', 'style="text-align: center;', $contenu);
preg_match('#(J[0-9]{1,2})#', $part3, $match);
$journee = trim(substr($match[1], 1));
$Tpl->chargeBuffer($page);
$Tpl->Parse('pageone', $contenu);
$resultat = array();
$resultat['html'] = $Tpl->output();
$resultat['journee'] = $journee;
echo json_encode($resultat);