⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 一个好用的php wap cms portal
💻 PHP
📖 第 1 页 / 共 4 页
字号:
/*        OpenTable();
        echo "<center><font class='option'><b>" . _CENSOROPTIONS . "</b></font></center>"
      ."<table border='0'><tr><td>"
      ."" . _CENSORMODE . "</td><td>";
        if ($CensorMode == 0) {
      $sel0 = "selected";
      $sel1 = "";
      $sel2 = "";
      $sel3 = "";
        } elseif ($CensorMode == 1) {
      $sel0 = "";
      $sel1 = "selected";
      $sel2 = "";
      $sel3 = "";
        } elseif ($CensorMode == 2) {
      $sel0 = "";
      $sel1 = "";
      $sel2 = "selected";
      $sel3 = "";
        } elseif ($CensorMode == 3) {
      $sel0 = "";
      $sel1 = "";
      $sel2 = "";
      $sel3 = "selected";
        }
        echo "<select name='xCensorMode'>"
      ."<option name='xCensorMode' value='0' $sel0>" . _NOFILTERING . "</option>"
      ."<option name='xCensorMode' value='1' $sel1>" . _EXACTMATCH . "</option>"
      ."<option name='xCensorMode' value='2' $sel2>" . _MATCHBEG . "</option>"
      ."<option name='xCensorMode' value='3' $sel3>" . _MATCHANY . "</option>"
      ."</select>"
      ."</td></tr><tr><td>" . _CENSORREPLACE . "</td><td>"
      ."<input type='text' name='xCensorReplace' value='$CensorReplace' size='10' maxlength='10'>"
      ."</td></tr></table><br><br>";
      CloseTable(); */


    // Settings for Wap-2-Go Users Module
    $row1 = $db->sql_fetchrow($db->sql_query("SELECT * FROM $prefix"._wap2go_module.""));
    $moduletitle      = $row1['moduletitle'];
    $moduletext1      = $row1['moduletext1'];
    $moduletext2      = $row1['moduletext2'];
    $moduledemotext   = $row1['moduledemotext'];
    $moduledemowidth  = $row1['moduledemowidth'];
    $moduledemoheight = $row1['moduledemoheight'];

    OpenTable();
        echo "<center><font class='option'>"._MODULEOPTIONS."</font></center><br/>
              <table width=\"100%\" align=\"center\">
                  <tr>
                      <td><img align=\"center\" src=\"modules/Wap-2-Go/images/admin_module.png\" alt=\"[Page Layout: DEMO with Text 1 to Right, 2 Below]\"></td><td>"._MODULELAYOUT."</td>
                  </tr>
              </table>

              <table align=\"center\">
                <tr>
                  <td colspan=\"2\" align=\"center\">
                    <b>"._MODULETITLE.":</b></br>
                    <input type='text' name='xmoduletitle' value='".$moduletitle."' size='80'>
                  </td>
                </tr>
                <tr>
                  <td align=\"right\" width=\"40%\">
                    <table align=\"center\">
                      <tr>
                       <td align=\"center\">
                         <img src=\"modules/Wap-2-Go/images/arrow_up.gif\" alt=\"Arrow Up\">
                         <br/>
                         y = <input type='text' name='xmoduledemoheight' value='".$moduledemoheight."' size='3'>px<br/>
                         <img src=\"modules/Wap-2-Go/images/arrow_down.gif\" alt=\"Arrow Down\">
                       </td>
                       <td><img src=\"modules/Wap-2-Go/images/demo.gif\" alt=\"[- Demo -]\"></td>
                      </tr>
                      <tr>
                       <td align=\"right\" colspan=\"2\">
                         <img src=\"modules/Wap-2-Go/images/arrow_left.gif\" alt=\"<------ \">
                         x = <input type='text' name='xmoduledemowidth' value='".$moduledemowidth."' size='3'>px
                         <img src=\"modules/Wap-2-Go/images/arrow_right.gif\" alt=\" ------>\">
                         </td>
                      </tr>
                    </table>
                    <br/><b>"._CAPTION.":</b><input type='text' name='xmoduledemotext' size='25' value='".$moduledemotext."'>
                  </td>
                  <td align=\"left\">
                    <b>"._MODULETEXT1.":</b></br>
                    <textarea name='xmoduletext1' cols='37' rows='15'>".$moduletext1."</textarea>
                  </td>
                </tr>
                <tr>
                  <td colspan=\"2\" align=\"center\">
                   <b>"._MODULETEXT2.":</b></br>
                   <textarea name='xmoduletext2' cols='60' rows='5'>".$moduletext2."</textarea>
                  </td>
                </tr>
              </table>";
    CloseTable();


      $hexcode = $mobilebackgroundcolor;
      if(substr($hexcode, 0, 1) == "#") {
        $hexcode = substr($hexcode, -6);
      }
      $r = hexdec(substr($hexcode, 0, 2));
      $g = hexdec(substr($hexcode, 2, 2));
      $b = hexdec(substr($hexcode, 4, 2));

      $strColor = "#".dechex(255 - $r).dechex(255 - $g).dechex(255 - $b);

      if (!$mobileaddress) { $mobileaddress = 0; }
      if ($mobileaddress==0) { $mobileaddresstoggle = "No"; }
                        else { $mobileaddresstoggle = "Yes"; }


      OpenTable();
      echo "<center><font class='option'><b>"._BLOCKOPTIONS."</b></font></center>";
      echo "<table border='0'><tr><td>"
      ."" . _MOBILEADDRESS . ":</td><td><select name='xmobileaddress'>"
          ."<option name='xmobileaddress' value='$mobileaddress'>". $mobileaddresstoggle."</option>"
          ."<option name='xmobileaddress' value='1'>Yes</option>"
          ."<option name='xmobileaddress' value='0'>No</option>"
      ."</select>"
      ."</td></tr><tr><td>"
      ."" . _MOBILEBORDERCOLOR . ":</td><td> #<input type='text' name='xmobilebordercolor' value='$mobilebordercolor' size='6' maxlength='6'>"
      ."</td></tr><tr><td>"
      ."" . _MOBILEBORDERWIDTH . ":</td><td><input type='text' name='xmobileborderwidth' value='$mobileborderwidth' size='2' maxlength='2'>px"
      ."</td></tr><tr><td>"
      ."" . _MOBILEBORDERSTYLE . ":</td><td><select name='xmobileborderstyle'>"
          ."<option name='xmobileborderstyle' style='$mobileborderstyle'>".$mobileborderstyle."</option>"
          ."<option name='xmobileborderstyle'>none</option>"
          ."<option name='xmobileborderstyle'>hidden</option>"
          ."<option name='xmobileborderstyle' style='border-style: dotted;'>dotted</option>"
          ."<option name='xmobileborderstyle' style='border-style: dashed;'>dashed</option>"
          ."<option name='xmobileborderstyle' style='border-style: solid;'>solid</option>"
          ."<option name='xmobileborderstyle' style='border-style: double;'>double</option>"
          ."<option name='xmobileborderstyle' style='border-style: groove;'>groove</option>"
          ."<option name='xmobileborderstyle' style='border-style: ridge;'>ridge</option>"
          ."<option name='xmobileborderstyle' style='border-style: inset;'>inset</option>"
          ."<option name='xmobileborderstyle' style='border-style: outset;'>outset</option>"
      ."</select>"
      ."</td></tr><tr><td>"
      ."" . _MOBILEBACKGROUNDCOLOR . ":</td><td> #<input type='text' name='xmobilebackgroundcolor' value='$mobilebackgroundcolor' size='6' maxlength='6'>"
      ."</td></tr><tr><td>"
      ."" . _MOBILESCREENX . ":</td><td><input type='text' name='xmobilescreenx' value='$mobilescreenx' size='3' maxlength='3'>px"
      ."</td></tr><tr><td>"
      ."" . _MOBILESCREENY . ":</td><td><input type='text' name='xmobilescreeny' value='$mobilescreeny' size='3' maxlength='3'>px"
      ."</td></tr></table>";
      CloseTable();


    // Submit and Save New Configuration
    OpenTable();
        echo "<input type='hidden' name='op' value='ConfigurePortalSave'>";
        if (!is_null($firstinstall)) { echo "<input type='hidden' name='firstinstall' value='1'>"; }
        echo "<center><input type='submit' value='" . _SAVECHANGES . "'></center>"
            ."</form>";
    CloseTable();
    w2gfooter();
    include("footer.php");
    }

/******************************************************************************/
/*  Decide which Operation we are carrying out                                */
/******************************************************************************/
switch ($op) {
       case "confirmdeletetables":
       confirmdeletetables();
       break;
       case "deletetables":
       deletetables();
       break;
       case "w2g_installation_1":
       installation_1();
       break;
       case "w2g_installation_2":
       installation_2();
       break;
       case "w2g_installation_3":
       installation_3();
       break;
       case "w2g_installation_4":
       installation_4();
       break;
       case "ConfigurePortal":
       ConfigurePortal();
       break;
       case "ConfigurePortalSave":
       global $prefix, $db, $firstinstall, $cookie;
       if ($_POST['firstinstall'] OR isset($firstinstall) OR isset($_GET["firstinstall"])) { $firstinstall = 1; }
       $xsitename         = trim(htmlentities($xsitename, ENT_QUOTES));
       $xw2g_url          = trim(htmlentities($xw2g_url, ENT_QUOTES));
       $xslogan           = trim(htmlentities($xslogan, ENT_QUOTES));
       $xbackend_title    = trim(htmlentities($xbackend_title, ENT_QUOTES));
       $xnotify_subject   = trim(htmlentities($xnotify_subject, ENT_QUOTES));
       $xDefault_Userlevel= trim(htmlentities($xDefault_Userlevel, ENT_QUOTES));

       // Module Settings
       $xmoduletitle      = trim(htmlentities($xmoduletitle, ENT_QUOTES));
       $xmoduletext1      = trim($xmoduletext1, ENT_QUOTES);
       $xmoduletext2      = trim($xmoduletext2, ENT_QUOTES);
       $xkeywords         = trim(htmlentities($xkeywords, ENT_QUOTES));
       $xmoduledemotext   = trim(htmlentities($xmoduledemotext, ENT_QUOTES));
       $xmoduledemowidth  = trim(htmlentities($xmoduledemowidth, ENT_QUOTES));
       $xmoduledemoheight = trim(htmlentities($xmoduledemoheight, ENT_QUOTES));
       $xnukedir          = trim(htmlentities($xnukedir, ENT_QUOTES));
       $xw2gdir           = trim(htmlentities($xw2gdir, ENT_QUOTES));
       $xhomepage_title   = trim(htmlentities($xhomepage_title, ENT_QUOTES));
       $xw2g_image_cache  = trim(htmlentities($xw2g_image_cache, ENT_QUOTES));

       if ($xnukeurl[strlen($xnukeurl)-1] == '/') { $xnukeurl = substr($xnukeurl, 0, -1); }
       if ($xw2g_url[strlen($xw2g_url)-1] == '/') { $xw2g_url = substr($xw2g_url, 0, -1); }
       if ($xw2gdir[strlen($xw2gdir)-1] == '/')   { $xw2gdir  = substr($xw2gdir, 0, -1); }
       if ($xnukedir[strlen($xnukedir)-1] == '/') { $xnukedir = substr($xnukedir, 0, -1); }

//  v0.865+ - new strings for block customisation || $xmobileaddress, $xmobileborderstyle, $xmobilebordercolor, $xmobileborderwidth, $xmobilebackgroundcolor, $xmobilescreenx, $xmobilescreeny
       $xmobileaddress         = intval($xmobileaddress);
       $xmobileborderstyle     = trim(htmlentities($xmobileborderstyle, ENT_QUOTES));
       $xmobilebordercolor     = trim(htmlentities($xmobilebordercolor, ENT_QUOTES));
       $xmobileborderwidth     = intval($xmobileborderwidth);
       $xmobilebackgroundcolor = trim(htmlentities($xmobilebackgroundcolor, ENT_QUOTES));
       $xmobilescreenx         = intval($xmobilescreenx);
       $xmobilescreeny         = intval($xmobilescreeny);

//  v0.865+ - added more fields for block customisation || "mobileaddress = '$xmobileaddress', mobileborderstyle = '$xmobileborderstyle', mobilebordercolor = '$xmobilebordercolor', mobileborderwidth = '$xmobileborderwidth', mobilebackgroundcolor = '$xmobilebackgroundcolor', mobilescreenx = '$xmobilescreenx', mobilescreeny = '$xmobilescreeny'"

       $db->sql_query("UPDATE ".$prefix."_wap2go_config SET sitename='$xsitename', nukeurl='$xnukeurl', site_logo='$xsite_logo', slogan='$xslogan', startdate='$xstartdate', adminmail='$xadminmail', anonpost='$xanonpost', Default_Theme='$xDefault_Theme', foot1='$xfoot1', foot2='$xfoot2', foot3='$xfoot3', commentlimit='$xcommentlimit', anonymous='$xanonymous', minpass='$xminpass', pollcomm='$xpollcomm', articlecomm='$xarticlecomm', broadcast_msg='$xbroadcast_msg', my_headlines='$xmy_headlines', top='$xtop', storyhome='$xstoryhome', user_news='$xuser_news', oldnum='$xoldnum', ultramode='$xultramode', banners='$xbanners', backend_title='$xbackend_title', backend_language='$xbackend_language', language='$xlanguage', locale='$xlocale', multilingual='$xmultilingual', useflags='$xuseflags', notify='$xnotify', notify_email='$xnotify_email', notify_subject='$xnotify_subject', notify_message='$xnotify_message', notify_from='$xnotify_from', moderate='$xmoderate', admingraphic='$xadmingraphic', httpref='$xhttpref', httprefmax='$xhttprefmax', CensorMode='$xCensorMode', CensorReplace='$xCensorReplace', UserGFXPref='$xUserGFXPref', MarkUPLang='$xMarkUPLang', IMGtype='$xIMGtype', Default_Userlevel='$xDefault_Userlevel', Cookie_Name='$xCookie_Name', Homepage_Mode='$xHomepage_Mode', Keywords='$xkeywords', jpeg_img_qual='$xjpeg_img_qual', w2g_url='$xw2g_url', default_weblinks_cat='$xdefault_weblinks_cat', nukedir = '$xnukedir', w2gdir = '$xw2gdir', homepage_title = '$xhomepage_title', w2g_image_cache = '$xw2g_image_cache', mobileaddress = '$xmobileaddress', mobileborderstyle = '$xmobileborderstyle', mobilebordercolor = '$xmobilebordercolor', mobileborderwidth = '$xmobileborderwidth', mobilebackgroundcolor = '$xmobilebackgroundcolor', mobilescreenx = '$xmobilescreenx', mobilescreeny = '$xmobilescreeny'");
       $db->sql_query("UPDATE ".$prefix."_wap2go_module SET moduletitle='$xmoduletitle', moduletext1='$xmoduletext1', moduletext2='$xmoduletext2', moduledemotext='$xmoduledemotext', moduledemowidth='$xmoduledemowidth', moduledemoheight='$xmoduledemoheight'");

       if ($firstinstall==1)
          {    $to      = "".$xadminmail."";
               $from    = 'Wap-2-Go Installer';
               $subject = "New Install :: ".$xsitename."";
               $username = $cookie[1];
               if (!$cookie) { $username = "Webmaster"; }
               $body    = "Dear ".$username.",\n"
                         .""._NOTEAUTO."\n"
                         ."\n"
                         .""._COURTESYMESSAGE."\n"
                         ."\n-========================================-\n"
                         .""._INSTALLDETAILS.":\n\n"
                         ."   WWW URL: ".$xnukeurl."\n"
                         ."MOBILE URL: ".$xw2g_url."";
                         if ($xw2g_url!=$xnukeurl."/mobile") { $body .= "\n"._IMP_NUKEDIR."define(\"NUKEDIR\",\"".dirname(dirname(dirname(dirname(__FILE__))))."\");"; }
               $body .=  "\n-========================================-\n"
                        .""._PROJECTHOMEPAGE."\n"
                        ."http://www.wap2go.co.uk";


               $to      = $xadminmail;
               $headers = "From: Wap-2-Go Installer <".$xadminmail.">\r\n" .
                          "Reply-To: Phil Marsh (Wap-2-Go Developer) <webmaster@wap2go.co.uk>\r\n".
                          "Cc: Wap-2-Go Installer <installs@wap2go.co.uk>\r\n";
                          "X-Mailer: PHP/" . phpversion();

               mail($to, $subject, $body, $headers);


          }

       Header("Location: ".$admin_file.".php?op=portal");
       break;
       case "portal":
       index();
       break;
}

} else {
  include("header.php");
  GraphicAdmin();
  OpenTable();
  echo "<center><b>"._ERROR."</b><br><br>You do not have administration permission for module \"$module_name\"</center>";
  CloseTable();
  include("footer.php");
}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -