コード例 #1
0
ファイル: showcomment.php プロジェクト: hxf829/Ironcms
<?php

include_once 'conn.php';
include_once 'library/basefunction.php';
include_once 'templatefunction/Iron.comment.php';
include_once 'templatefunction/Iron.label.php';
readcache();
header('Content-Type: text/html; charset=UTF-8');
//$articleid = $_GET["articleid"];
//echo $articleid;
//$templateid = getcolumnformation($articleid,"articletemplate");
//$templatepath = getresultData(getresult("select * from I_template where id=$templateid"),0,"path");
$templatefile = getroot() . "/templates/comment.html";
//echo $templatefile;
$template = file_get_contents($templatefile);
$template = translateCommentlist($template);
$template = translateCommentCommonlabel($template);
$template = translatelabel($template);
echo $template;
ob_flush();
buildcache($template);
コード例 #2
0
ファイル: showsresult.php プロジェクト: hxf829/Ironcms
<?php

session_start();
include_once 'conn.php';
include_once 'library/basefunction.php';
include_once 'lang/envinit.php';
include_once 'templatefunction/Iron.article.php';
include_once 'templatefunction/Iron.column.php';
include_once 'templatefunction/Iron.label.php';
include_once 'templatefunction/Iron.search.php';
$columnid = $_GET["columnid"];
$templatefile = getroot() . "/templates/searchresult.html";
if ($columnid != NULL && $columnid != '') {
    $templateid = getcolumnformationBycolumnid($columnid, "searchtemplate");
    $templatepath = getresultData(getresult("select * from I_template where id={$templateid}"), 0, "path");
    $templatefile = getroot() . "/templates/" . $templatepath;
}
//echo $templatefile;
if (!file_exists($templatefile)) {
    die("The template file doesn'n exit!");
}
$template = file_get_contents($templatefile);
//如果模板被删除
if (!$template) {
    die("<script type='text/javascript'>alert('The template doesn't exists!')window.location='error.html'</script>");
}
$template = translatelabel($template);
$template = translateSearchlist($template);
$template = translateArticlelist($template);
$template = translateCommonlabel($template);
echo $template;
コード例 #3
0
ファイル: article.php プロジェクト: jcmwc/fleet
     $myext5 = "'" . getext($_FILES["ext5"]["name"]) . "'";
 } else {
     if ($_POST["ext5"] != "") {
         $myext5 = "'" . $_POST["ext5"] . "'";
     } else {
         $myext5 = "null";
     }
 }
 $txtmsg = "L'élément a &eacute;t&eacute; ajout&eacute;";
 //recherche du nouvel ordre
 $sql = "select max(ordre) as maxordre from " . __racinebd__ . "arbre where supprimer=0 and pere " . ($_GET["pere"] == "" || $_GET["pere"] == "0" ? "is null" : "=" . $_GET["pere"]);
 $link = query($sql);
 $tbl_result = fetch($link);
 $maxordre = $tbl_result["maxordre"] + 1;
 //enregistrement dans la table arbre
 $sql = "insert into " . __racinebd__ . "arbre (gabarit_id,pere,users_id_crea,ordre,secure,etat_id,root) values (" . $_GET["gabarit_id"] . "," . ($_GET["pere"] == "" || $_GET["pere"] == "0" ? "null" : $_GET["pere"]) . "," . $_SESSION["users_id"] . ",{$maxordre},'" . $_POST["secure"] . "',2," . getroot($_GET["pere"]) . ")";
 query($sql);
 $arbre_id = insert_id();
 //affectation des droits identique a ceux du pere
 $sql = "select * from " . __racinebd__ . "groupe_arbre where arbre_id='" . $_GET["pere"] . "'";
 $link = query($sql);
 if (num_rows($link) > 0) {
     while ($tbl_result = fetch($link)) {
         $sql = "insert into " . __racinebd__ . "groupe_arbre (arbre_id,droits_id,groupe_id) values (" . $arbre_id . "," . $tbl_result["droits_id"] . "," . $tbl_result["groupe_id"] . ")";
         query($sql);
     }
 } else {
     //si le pere ne possede aucun droit on lui met tout les droits
     /*
     $sql="select * from groupe";
     $link=query($sql);
コード例 #4
0
ファイル: flashmanager.php プロジェクト: phill104/branches
     if ($result[0][0] != 0) {
         return true;
     } else {
         return false;
     }
 }
 $get = Inspekt::makeGetCage();
 if ($superCage->get->getRAW('check') == 1) {
     securityCheck();
 } else {
     if (verifykey($superCage->get->getRAW('magik'))) {
         if ($superCage->get->getRAW('getalb') == 1) {
             getImages($superCage->get->getRAW('alb'));
         } else {
             if ($superCage->get->getRAW('getroot') == 1) {
                 getroot();
             } else {
                 if ($superCage->get->getRAW('getcat') == 1) {
                     getAlbums($superCage->get->getRAW('cat'));
                 } else {
                     if ($superCage->get->getRAW('albumlisting') == 1) {
                         treeBuilder();
                     } else {
                         if ($superCage->get->getRAW('getimg') == 1) {
                             getimg($superCage->get->getRAW('img'));
                         } else {
                             if ($superCage->get->getRAW('photoinfo') == 1) {
                                 getPhotoInfo($superCage->get->getRAW('photo'));
                             } else {
                                 if ($superCage->get->getRAW('albumList') == 1) {
                                     albumList();
コード例 #5
0
ファイル: function_arbre.php プロジェクト: jcmwc/fleet
function moveNode($dragID, $dropID)
{
    //on recherche son ordre actuel
    $sql = "select pere,ordre from " . __racinebd__ . "arbre where arbre_id=" . $dragID;
    $link = query($sql);
    $ligne = fetch($link);
    $ordre = $ligne["ordre"];
    $pere = $ligne["pere"];
    //on recherche ne nombre de fils du nouveau pere
    $sql = "select max(ordre)as maxordre from " . __racinebd__ . "arbre where supprimer=0 and pere" . ($dropID == "_1" ? " is null" : "=" . $dropID);
    $link = query($sql);
    $ligne = fetch($link);
    $newordre = $ligne["maxordre"];
    $newpere = $dropID == "_1" ? "null" : $dropID;
    $newordre = $pere == $newpere || $pere == "" && $newpere == "null" ? $newordre - 1 : $newordre;
    //on modifie tous les ordres des freres ayant un ordre plus grand que le mien
    $sql = "update " . __racinebd__ . "arbre set ordre=ordre-1 where supprimer=0 and pere" . ($pere == "" ? " is null " : "=" . $pere) . " and ordre>=" . $ordre;
    query($sql);
    //print $sql."<br>";
    $sql = "update " . __racinebd__ . "arbre set ordre=" . ($newordre + 1) . ", pere = " . ($newpere == "" ? "null" : $newpere) . ",root=" . getroot($newpere) . " where arbre_id=" . $dragID;
    //print $sql."<br>";
    query($sql);
    return true;
}
コード例 #6
0
ファイル: basefunction.php プロジェクト: hxf829/Ironcms
function buildcache($content)
{
    global $language;
    $specialletters = array(":", "/", "&", "?", ".");
    $cachefilepath = getroot() . "/temp/" . str_replace($specialletters, "", $_SERVER['REQUEST_URI']) . ".cache";
    if (!file_exists(getroot() . "/temp/")) {
        mkdir(getroot() . "/temp/");
    }
    $fp = fopen($cachefilepath, "w");
    fwrite($fp, $content);
    fclose($fp);
}
コード例 #7
0
ファイル: admin_clearimg.php プロジェクト: hxf829/Ironcms
                $filename = basename($path);
                $ifused = getresultNumrows(getresult("select * from I_article where contents like '%" . $filename . "%'"));
                if ($ifused <= 0) {
                    echo "删除:" . $path . "<br>";
                    unlink($path);
                }
            }
        }
    }
    closedir($dir);
    //呵呵,这个函数只能删除空文件夹,有文件的文件夹会失败
    if ($index != 0) {
        if (rmdir($imgdir)) {
            echo "删除" . $imgdir . "<br>";
        }
    }
}
echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='function'>\n";
echo "<tr class='header'>\n";
echo "<td align='center'>" . gettext_r("processing") . "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='left'>";
checkimg(getroot() . "/userfiles");
echo "清理完毕";
echo "</td>\n";
echo "</tr>\n";
?>
</div>
</body>
</html>
コード例 #8
0
ファイル: admin_template.php プロジェクト: hxf829/Ironcms
                    echo "<script type='text/javascript'>alert('文件类型错误');history.back(-1);</script>";
                } else {
                    $filename = $file[name];
                    $tempfilename = $file[name];
                    //echo $tempfilename;
                    $index = 1;
                    for (;;) {
                        if (file_exists(getroot() . "/templates/" . $tempfilename)) {
                            $tempfilename = substr($file[name], 0, $pos) . "(" . $index . ")." . $ext;
                            $index++;
                        } else {
                            break;
                        }
                    }
                    $filename = $tempfilename;
                    if (!move_uploaded_file($file[tmp_name], getroot() . "/templates/" . $filename)) {
                        die("<script type='text/javascript'>alert('文件上传失败');history.back(-1);</script>");
                    }
                    if (!getresult("update I_template set templatename='{$templatename}',path='{$filename}' where id={$templateid}")) {
                        die("<script type='text/javascript'>alert('数据库修改失败');history.back(-1);</script>");
                    }
                    die("<script type='text/javascript'>alert('模板修改成功');window.location='admin_template.php?type={$type}'</script>");
                }
            } else {
                die("<script type='text/javascript'>alert('请选择要上传的文件文件');history.back(-1);</script>");
            }
        }
        ?>
<form action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="<?php 
        echo $type;
コード例 #9
0
ファイル: envinit.php プロジェクト: hxf829/Ironcms
        if (is_file(getroot() . "/lang/" . $_SESSION["frontlang"] . ".php")) {
            require $_SESSION["frontlang"] . ".php";
        }
    }
}
//以下代码支持栏目及相关页面国际化操作
if (preg_match("/.*(showcolumn|showarticle|showcomment)\\.php.*/", $_SERVER['URL'], $matchs) > 0) {
    $columnid = -1;
    if ($_GET["articleid"] != NULL && $_GET["articleid"] != "") {
        $columnid = getcolumnformation($_GET["articleid"], "id");
    }
    if ($_GET["columnid"] != NULL && $_GET["columnid"] != "") {
        $columnid = $_GET["columnid"];
    }
    $columnLanguage = trim(getcolumnformationBycolumnid($columnid, "lang"));
    //栏目的语言如果为Auto,则继承父栏目语言,如果没有父栏目,则继承前台页面语言
    while ($columnLanguage == "Auto") {
        $parentid = (int) getcolumnformationBycolumnid($columnid, "parentid");
        if ($parentid == 0) {
            //已经查询至一级栏目
            break;
        }
        if ($parentid > 0) {
            $columnid = $parentid;
            $columnLanguage = trim(getcolumnformationBycolumnid($columnid, "lang"));
        }
    }
    if ($columnLanguage != "Auto" && $columnLanguage != "" && is_file(getroot() . "/lang/" . $columnLanguage . ".php")) {
        require $columnLanguage . ".php";
    }
}
コード例 #10
0
ファイル: fckeditor_php4.php プロジェクト: hxf829/Ironcms
 /**
  * Main Constructor.
  * Refer to the _samples/php directory for examples.
  *
  * @param string $instanceName
  */
 function FCKeditor($instanceName)
 {
     $this->InstanceName = $instanceName;
     $this->BasePath = getroot() . '/fckeditor/';
     $this->Width = '100%';
     $this->Height = '200';
     $this->ToolbarSet = 'Default';
     $this->Value = '';
     $this->Config = array();
 }
コード例 #11
0
ファイル: shrub.php プロジェクト: shedrachokonofua/Shrub
 public function __construct()
 {
     $this->staticDir = $this->root . '/public';
     $this->request = isset($_GET['request']) ? $_GET['request'] : '/';
     $this->root = getroot();
     $this->keys['get'] = array();
     $this->positions['get'] = array();
     $this->routes['get'] = array();
     $this->callback['get'] = array();
     $this->keys['post'] = array();
     $this->positions['post'] = array();
     $this->routes['post'] = array();
     $this->callback['post'] = array();
 }