הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 10-08-07, 10:37   # 1
Ron | CSite.co.il
חבר על
 
מיני פרופיל
תאריך הצטרפות: Jun 2007
גיל: 33
הודעות: 980

Ron | CSite.co.il לא מחובר  

[בעיה]בקשר לעורך tiynmce וphp...

שלום לכולם,
אני מנסה לבנות מערכת ניהול.
אני משתמש בעורך tiynmce ,אני מנסה לקבל מ tiynmce נתונים ,להכניס אותם למסד ולאחר הלחיצה על סמביט להפנות את המשתמש לעמוד הניהול ,ולהציג את התוצאה בדף הראשי(index.php)

השגיאה היא שזה מפנה אותי ל index.php ושרק אחרי ריענון של הדף הוא מתעדכן בתוכן החדש (לפני ריענון זה כותב מה שלחצתי בסאבמיט הקודם)

זה קוד ה-index.php :


PHP קוד:
<?php 





  $mysql_link
=mysql_connect('localhost','root','')///////////connect mysql
 
or die("ERROR: cannot connect to MySQL server.");//////////connect mysql
  
echo "";//////////connect mysql
                                                     //////////connect mysql
  
if (mysql_select_db('mydb',$mysql_link)     //////////connect mysql
                                                   //////////connect mysql
)                                              //////////connect mysql
     
echo "";               //////////connect mysql
  
else
     echo 
"Could not select the DB.";            



$query "SELECT * FROM admin";
$result mysql_query($query) or die("Query failed: ".mysql_error());






  
    if (isset(
$_POST['elm1'])){   //admin 
$elm1 = ($_POST['elm1']); 
mysql_query("UPDATE `admin` SET `index`='$elm1' "); 

}        

 while (
$row mysql_fetch_array($result))
  {              
                      
                    echo 
$row['index'];
 }
 

?>



זה קוד ה- admin.php:

PHP קוד:
<?php
ob_start
();
require 
"function.php";
echo 
connection_db();


 
function 
login_user() //fuonction start
{
if (isset(
$_POST['login'])){      //login
$name htmlspecialchars($_POST['user']);
$pass htmlspecialchars($_POST['pass']); 
$query mysql_query("SELECT * FROM `login` where `pass` = '$pass' && `user` = 'ronolo'");
$row mysql_num_rows($query);
if (
$row 0) {

login_succes();

}
else {
menu_one(); //function.php
login_notsucces();

}} else {
menu_one();  //function.php
login_notisset();

}
 }   
//fuonction end
 
 
 
login_user();

 
 
 
 
 function 
login_succes() //fuonction start
 
{
  
 
$name htmlspecialchars($_POST['user']);
session_start(); 
$_SESSION['youlogin'] = "$name";
$sosdog1 $_SESSION['youlogin'];

echo <<<st




<html>
<head>



 <!-- TinyMCE -->
<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
    tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
        theme_advanced_buttons1_add_before : "save,newdocument,separator",
        theme_advanced_buttons1_add : "fontselect,fontsizeselect",
        theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
        theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
        theme_advanced_buttons3_add_before : "tablecontrols,separator",
        theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,|,code",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        content_css : "example_full.css",
        plugin_insertdate_dateFormat : "%Y-%m-%d",
        plugin_insertdate_timeFormat : "%H:%M:%S",
        extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
        external_link_list_url : "example_link_list.js",
        external_image_list_url : "example_image_list.js",
        flash_external_list_url : "example_flash_list.js",
        media_external_list_url : "example_media_list.js",
        template_external_list_url : "example_template_list.js",
        file_browser_callback : "fileBrowserCallBack",
        theme_advanced_resize_horizontal : false,
        theme_advanced_resizing : true,
        nonbreaking_force_tab : true,
        apply_source_formatting : true,
        template_replace_values : {
            username : "Jack Black",
            staffid : "991234"
        }
    });

function fileBrowserCallBack(field_name, url, type, win) {
        // This is where you insert your custom filebrowser logic
        alert("Example of filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);

        // Insert new URL, this would normaly be done in a popup
        win.document.forms[0].elements[field_name].value = "someurl.htm";
    }
</script>
<!-- /TinyMCE -->
</head>
<body bgcolor="#33CCFF">


<table border=1 background="login.jpg" align=center>
 
 <tr>
 <td align=center>

 $sosdog1 :ברוך הבא אתה מחובר כ 
  <br><br>
 <a href='login.php'><B> התנתק
<B/></a>
 
 
 </td>
 </tr>
 </table>
 
 <form method="post" action="index.php">
    <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
        &lt;span class=&quot;example1&quot;&gt;Test header 1&lt;/span&gt;&lt;br /&gt;
        &lt;span class=&quot;example2&quot;&gt;Test header 2&lt;/span&gt;&lt;br /&gt;
        &lt;span class=&quot;example3&quot;&gt;Test header 3&lt;/span&gt;&lt;br /&gt;
        Some &lt;b&gt;element&lt;/b&gt;, this is to be editor 1. &lt;br /&gt; This editor instance has a 100% width to it.
        &lt;p&gt;Some paragraph. &lt;a href=&quot;http://www.sourceforge.net&quot;&gt;Some link&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;logo.jpg&quot;&gt;
    </textarea>
    <br />
    <input type="submit" name="save" value="Submit" />
    <input type="reset" name="reset" value="Reset" />
</form>
 

 

 </body>
</html>


st;

  } 
//fuonction end
 
 

 
 
function login_notisset() //fuonction start
 
{
 
 echo <<<st
<body bgcolor=#33CCFF>
 <table border=1 align=center>
 
 <tr>
 <td align=center width=265>
<form method="post"> 
  <br>
  <center><h4>התחברות מנהלים</h4></center>
<input type="text" name="user">&nbsp; :שם משתמש
<br><input type="password" name="pass">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :סיסמא
<center><input type="submit" name="login" value="התחבר"><br></center><br>
 כדי להירשם לחץ<a href="register.php"><font color=red> כאן</font></a>
 <form/></td>
 </tr>
 </table>
st;
 }
 
 
 
 
 
 
ob_end_flush();

     
?>

מה שלא ניסיתי זה פשוט לא הצליח.|עצוב|
תודה לכל העוזרים.

Last edited by Ron | CSite.co.il; 10-08-07 at 10:43..
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 19:03.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ