Solved

500 points to convert php codes to asp code

Posted on 2004-03-24
4
292 Views
Last Modified: 2012-08-14
Please convert php codes to asp code(1000 points):

<?php
session_start();
include( "conf_class.php" );

if ( !( $_SESSION['mc2_power'] > 0 || 1 == $open_words ) )
{
      include( "func_js.php" );
      jsTWinAlert();
      jsTWinBack();
      die();
}
include( "inc_online.php" );
//--------------------------------------------------------*/
if ( !$CONF_MYSQL ) include( "conf_mysql.php" );
$page = ( intval( $_GET['page'] ) > 0 ? ( intval( $_GET['page'] ) - 1 ) : 0 );
$sql = "select t1.*, t2.name from mc2_word as t1, mc2_member as t2 where t1.author=t2.id order by t1.id desc limit ". ( $page * $words_per_page ) .",". ( $words_per_page + 1 );
$Myres = mysql_query( $sql , $Mylink );
$word_num = mysql_num_rows( $Myres );
if ( 0 == $word_num && $page > 0 ) { header( "location: leaveword.php?page=". $page ); die(); }            
$f_pageup = ( $page ? 1 : 0 );                                          
$f_pagedown = ( $word_num > $words_per_page ? 1 : 0 );            /

$title = "classmessage";
include( "func_html.php" );
htmlHead( $title , true );
?>

<?php htmlNav( 1 ); ?>
<?php htmlNav2( $class_name , $title ); ?>

<?php
include ( "func_ext.php" );
for ( $i = 0 ; $i < $words_per_page && $objWord = mysql_fetch_object( $Myres ) ; $i++ )
{
      echo '
            <tr bgcolor=#F3F3F3>
              <td height=23 align=center><img src="images/arrow.gif" width=4 height=7></td>
              <td class="green1"> '. $objWord->time .' <a href="javascript:dn()" onmouseover="showPopupMenu(this, popMenu, \''. $objWord->author .'\')" onmouseout="hidePopupMenu(this, popMenu)" class=cr1>'. htmlspecialchars( $objWord->name ) .'</a>'. ( $objWord->author == $_SESSION['mc2_id'] ? ' <a href="deal_word.php?action=get&id='. $objWord->id .'" target="deal"><img src="images/word_edit.gif" width=12 height=14 alt="change"></a>' : '' ) . ( ( $_SESSION['mc2_power'] > 1 || $_SESSION['mc2_id'] == $objWord->author ) ? ' <a href="deal_word.php?action=del&id='. $objWord->id .'" target="deal"><img src="images/word_del.gif" alt="delete"></a>' : '' ) .'</td>
              <td></td>
            </tr>
            <tr>
              <td height=26></td>
              <td class=cla1><div style="width:512px" class=wrap><script>doFlatTxt("'. showWord( $objWord->content , $objWord->bhtml ) .'")</script></div></td>
              <td></td>
            </tr>';
}
?>            

            <tr>
              <td height=24 align=right class="green1"><?php if ( $f_pageup ) echo '<a href="leaveword.php?page='. $page .'" class="green1">&lt;&lt;lastpage</a>¡¡'; if ( $f_pagedown ) echo '<a href="leaveword.php?page='. ( $page + 2 ) .'" class="green1">nextpage&gt;&gt;</a>¡¡'; ?>goto <input name=page type=text class="input" size=1> page </td>
              <td width=40 align=center><input type=image src="images/btn_21.gif"></td>
            </tr>
            
<input type=radio name=txtType onclick="show(0)"> 111 <input type=radio name=txtType onclick="show(1)"> 222
                        <img src="images/btn_26.gif" height=18 width=58 style="display:none" alt="edit" onClick="submitForm(txtForm,'deal_word.php?action=mod')" class=lnk id="txtMod">
                        
                        <script language="JavaScript"> show(<?php echo ( $_GET['html'] > 0 ? 1 : 0 );?>); </script>
                        <img src="images/btn_26.gif" height=18 width=58 style="display:none" alt="edit" onClick="e2c();submitForm(htmlForm,'deal_word.php?action=mod')" class=lnk id="htmlMod">
                        <img src="images/btn_08.gif" height=18 width=58 onclick="e2c();submitForm(htmlForm,'deal_word.php?action=add');" alt="addnew" class=lnk>
                        <img src="images/btn_09.gif" width=58 height=18 class=lnk onclick="c2e('')" alt="clear">
<?php htmlFoot(); ?>
0
Comment
Question by:ocany54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
asus2k earned 500 total points
ID: 10668995
<%
Dim gv__SESSION(), gv_page, gv__GET(), gv_words_per_page, gv_Myres, gv_word_num, gv_f_pageup, gv_f_pagedown, gv_title


session_start();include("conf_class.php");If !( gv__SESSION("mc2_power") > 0 || 1 == $open_words )  then
      include("func_js.php");jsTWinAlert();jsTWinBack();die()End If

include("inc_online.php");' --------------------------------------------------------*/
      If !$CONF_MYSQL  then
      
  include( "conf_mysql.php" );
      
  End If
      gv_page  = ( intval( gv__GET("page") ) > 0 ? ( intval( $_GET["page"] ) - 1 ) : 0 )
      $sql  = "select t1.*, t2.name from mc2_word as t1, mc2_member as t2 where t1.author=t2.id order by t1.id desc limit " &  ( $page * $words_per_page )  & "," &  ( gv_words_per_page + 1 )
      gv_Myres  =
      gv_word_num  = mysql_num_rows( gv_Myres )
      If 0 == gv_word_num && gv_page > 0  then
            header("location:leaveword.php?page=".gv_page ); die(); }          
gv_f_pageup =(gv_page ? 1 : 0 );                                  
gv_f_pagedown =(gv_word_num > gv_words_per_page ? 1 : 0 );          /

gv_title  = "classmessage"
            include("func_html.php");htmlHead(
%>

<%
htmlNav(1);
%>
<%
htmlNav2($class_name , $title ); ?>

<%
include ("func_ext.php");For $i  = 0  to $words_per_page && $objWord = mysql_fetch_object( $Myres )
                  Response.Write "
                            <tr bgcolor=#F3F3F3>
                              <td height=23 align=center><img src=""images/arrow.gif"" width=4 height=7></td>
                              <td class=""green1""> " &  $objWord->time  & " <a href=""javascript:dn()"" onmouseover=""showPopupMenu(this, popMenu, ''. $objWord->author ."')" onmouseout="hidePopupMenu(this, popMenu)" class=cr1>". htmlspecialchars( " & objWord & ""->name ) ."</a>". ( " & objWordobjWord & ""->author == " & objWordobjWord_SESSION["mc2_id"] & "" ? " <a href="deal_word.php?action=get&id=". $objWord->id ."" target="deal"><img src="images/word_edit.gif" width=12 height=14 alt="change"></a>" : "" ) . ( ( $_SESSION["mc2_power'] > 1 || $_SESSION["mc2_id"] == $objWord->author ) ? " <a href=""deal_word.php?action=del&id=" &  $objWord->id  & """ target=""deal""><img src=""images/word_del.gif"" alt=""delete""></a>" : "" )  & "</td>
                              <td></td>
                            </tr>
                            <tr>
                              <td height=26></td>
                              <td class=cla1><div style=""width:512px"" class=wrap><script>doFlatTxt(""" &  showWord( $objWord->content , $objWord->bhtml )  & """)</script></div></td>
                              <td></td>
                            </tr>"
            Next


%>          

          <tr>
            <td height=24 align=right class="green1"><%
If gv_f_pageup  then
            
  Response.Write "<a href=""leaveword.php?page=" &  $page  & """ class=""green1"">&lt;&lt;lastpage</a>¡¡"
            
  End If
            If gv_f_pagedown  then
            
  Response.Write "<a href=""leaveword.php?page=" &  ( $page + 2 )  & """ class=""green1"">nextpage&gt;&gt;</a>¡¡"
            
  End If
            
%>goto <input name=page type=text class="input" size=1> page </td>
            <td width=40 align=center><input type=image src="images/btn_21.gif"></td>
          </tr>
         
<input type=radio name=txtType onclick="show(0)"> 111 <input type=radio name=txtType onclick="show(1)"> 222
                    <img src="images/btn_26.gif" height=18 width=58 style="display:none" alt="edit" onClick="submitForm(txtForm,'deal_word.php?action=mod')" class=lnk id="txtMod">
                   
                    <script language="JavaScript"> show(<%
Response.Write ( gv__GET("html") > 0 ? 1 : 0 )
            
%>); </script>
                    <img src="images/btn_26.gif" height=18 width=58 style="display:none" alt="edit" onClick="e2c();submitForm(htmlForm,'deal_word.php?action=mod')" class=lnk id="htmlMod">
                    <img src="images/btn_08.gif" height=18 width=58 onclick="e2c();submitForm(htmlForm,'deal_word.php?action=add');" alt="addnew" class=lnk>
                    <img src="images/btn_09.gif" width=58 height=18 class=lnk onclick="c2e('')" alt="clear">
<%
htmlFoot();
%>
0
 
LVL 1

Expert Comment

by:asus2k
ID: 10669005
^ there may be one or two little errors with the above code ^
0
 

Author Comment

by:ocany54
ID: 10675204
still got php codes.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question