[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

500 points to convert php codes to asp code

Posted on 2004-03-24
4
Medium Priority
?
300 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
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
asus2k earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month19 days, 10 hours left to enroll

872 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