<?PHP

// ********************************************************************************
// CuteCode
// ********************************************************************************
if($action == "cutecode")
{
echo"<html>
        <head>
        <title>CuteCode</title>
    <style type=\"text/css\">
        <!--
         BODY, TD {text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt;}
         a:active,a:visited,a:link {color: #446488; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt;}
         a:hover {font-size : 8pt; color: #000000; font-family: verdana; text-decoration: none; }
        -->
        </style>
        </head>
        <body bgcolor=#FFFFFF>
        <script language=\"javascript\" type=\"text/javascript\">
        <!--
        function insertcode(type,var1,var2) {

     if(var1 != null){
      if(var2 == null){ var2='  '; }

        switch(type) {
                case 'link':
                        code = '<a href=\"' +var1+ '\">' +var2+ '</a>';
                        break;
                case 'image':
                        code = '<img src=\"' +var1+ '\" alt=\"\" style=\"border: none;\" />';
                        break;
                case 'bold':
                        code = '<strong>' +var1+ '</strong>';
                        break;
                case 'italic':
                        code = '<em>' +var1+ '</em>';
                        break;
                case 'underline':
                        code = '<span style=\"text-decoration: underline;\">' +var1+ '</span>';
                        break;
                case 'color':
                        code = '<span style=\"color: ' +var1+ '\">' +var2+ '</span>';
                        break;
                case 'size':
                        code = '<span style=\"font-size: ' +var1+ 'pt\">' +var2+ '</span>';
                        break;
                case 'font':
                        code = '<span style=\"font-family: ' +var1+ '\">' +var2+ '</span>';
                        break;
                case 'align':
                        code = '<div style=\"text-align: ' +var1+ '\">' +var2+ '</div>';
                        break;
                case 'quote':
                        code = '[quote]' +var1+ '[/quote]';
                        break;
                case 'list':
                        code = '<ul>\\n<li>Text1</li>\\n<li>Text2</li>\\n<li>Text3</li>\\n</ul>';
                        alert('Sample List will be inserted into the textarea');
                        break;
                default:
        }

                code = ' ' + code + ' ';
            opener.document.addnews.$target.value  += code;
                    if(document.my.ifClose.checked == true)
            {
             opener.document.addnews.$target.focus();
             window.close();
             opener.document.addnews.$target.focus();
            }
      }
        }
        //-->
        </script>
    <table border=0 height=247 width=320 cellspacing=\"0\" cellpadding=\"0\">

        <td height=\"15\" colspan=\"2\" width=\"21\">
        <td height=\"15\" width=\"342\">
        <tr>
    <td height=\"15\" colspan=\"2\" width=\"367\">
    <font size=\"1\" face=\"Verdana\"><b>QuickTags</b></font>
    <td height=\"15\" width=\"0\">
        </tr>

        <tr bgcolor=#F7F6F4><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('link', prompt('Enter the complete URL of the hyperlink', 'http://'), prompt('Enter the title of the webpage', '') )\">
        Insert Link</a>
        <td height=16 width=\"0\">
    [link=<font color=\"#808080\">URL</font>]<font color=\"#808080\">Text</font>[/link]
        </tr>

    <tr ><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('image', prompt('Enter URL of the Image:', 'http://') )\">
        Insert Image</a>
        <td height=16 width=\"0\">
    [image=<font color=\"#808080\">URL</font>]
        </tr>

        <tr bgcolor=#F7F6F4><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('quote', prompt('Text to Quote:', '') )\">
        Instert Quote</a>
        <td height=16 width=\"0\">
    [quote=<font color=\"#808080\">Name</font>]<font color=\"#808080\">Text</font>[/quote]
        </tr>

    <tr ><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('list', 'none' )\">
        Insert List</a>
        <td height=16 width=\"0\">
    [list]<font color=\"#808080\">[*]Text1[*]Text2</font>[/list]
        </tr>

    <tr bgcolor=#F7F6F4><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('bold', prompt('Enter Text you want to be BOLD', '') )\">
        Bold Text</a>

        <td height=16 width=\"0\">
    [b]<font color=\"#808080\">Text</font>[/b]
        </tr><tr ><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
         <a href=\"javascript:insertcode('italic', prompt('Enter Text you want to be Italic', '') )\">
        Italic Text</a>
        <td height=16 width=\"0\">
    [i]<font color=\"#808080\">Text</font>[/i]
        </tr><tr bgcolor=#F7F6F4><td height=16 width=\"21\">

        &nbsp;
        <td height=16 width=\"344\">
         <a href=\"javascript:insertcode('underline', prompt('Enter Text you want to be Underlined', '') )\">
        Underlined Text</a>
        <td height=16 width=\"0\">
    [u]<font color=\"#808080\">Text</font>[/u]
        </tr>



    <tr><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('color', prompt('Enter color of the text (blue, red, green, fuchsia)',''), prompt('Enter the text to be in this color','') )\">
        Text Color</a>
        <td height=16 width=\"0\">
    [color=<font color=\"#808080\">COLOR</font>]<font color=\"#808080\">Text</font>[/color]
        </tr><tr bgcolor=#F7F6F4><td height=16 width=\"21\">

        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('size', prompt('Enter size of the text (in points format)',''), prompt('Enter the text to be in this size','') )\">
        Text Size</a>
        <td height=16 width=\"0\">
    [size=<font color=\"#808080\">SIZE</font>]<font color=\"#808080\">Text</font>[/size]
        </tr><tr><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('font', prompt('Enter font of the text (verdana, arial, times, courier)',''), prompt('Enter the text to be in this font','') )\">
        Text Font</a>

        <td height=16 width=\"0\">
    [font=<font color=\"#808080\">FONT</font>]<font color=\"#808080\">Text</font>[/font]
        </tr><tr bgcolor=#F7F6F4><td height=16 width=\"21\">
        &nbsp;
        <td height=16 width=\"344\">
        <a href=\"javascript:insertcode('align', prompt('Enter align of the text (right, left, center, justify)',''), prompt('Enter the text to be in this align','') )\">
        Text Align</a>
        <td height=16 width=\"0\">
    [align=<font color=\"#808080\">ALIGN</font>]<font color=\"#808080\">Text</font>[/align]
        </tr><tr>
        <td  width=21 height=\"57\">
        &nbsp;<form name=my>
        <td height=57 colspan=\"2\" width=\"342\">

    <label><input type=checkbox checked name=ifClose> Close this window after I insert code</label>
        </tr></form>
        </table></body></HTML>";
}
else{
        echoheader("question", "Help / About");

if ( function_exists("md5_file") ){
   $functions_md5 = md5_file("inc/functions.inc.php");
}else{
   $functions_md5 = "MD5NotSupported";
}

 //        echo"$functions_md5";
if(file_exists("./data/reg.php")){ include("./data/reg.php"); }

    echo"<table border=0 cellpading=0 cellspacing=0 width=\"654\" height=\"175\" >
    <tr>
    <td width=\"650\" valign=\"middle\" height=\"1\" bgcolor=\"#F7F6F4\" colspan=\"3\">
    &nbsp; <font size=\"2\"><b>Help &amp; Support</b></font>&nbsp;
    </tr>
    <tr>
    <td width=\"31\" valign=\"middle\" height=\"70\">
    &nbsp;&nbsp;
    <td width=\"619\" valign=\"middle\"  colspan=\"2\" align=justify>
    If you are experiencing any kind of problems, the first thing you should do before asking for  help from us is look
    at <a href=\"$PHP_SELF?mod=help\">CuteNews internal Help Documentation</a>.
    If you still can not solve your problem look at the <a href=\"http://cutephp.com/faq/\" target=\"_blank\">FAQ section of our site</a> or post your issues in our <a href=\"http://cutephp.com/forum/\" target=\"_blank\">support
    forum</a>, but only after you have read the readme.html file included in the zip

    <ol style=\"margin-bottom:8px;\">
    <li><a href=\"$PHP_SELF?mod=help\">Internal Help Documentation</a></li>
    <li><a href=\"http://cutephp.com/cutenews/readme.html\" target=_blank>Readme.html File (online)</a></li>
    <li><a href=\"http://cutephp.com/forum/\" target=_blank>Support Forums</a></li>
    </ol>

    </tr>



    <tr>
    <td width=\"650\" valign=\"middle\" height=\"1\" bgcolor=\"#F7F6F4\" colspan=\"3\">
    &nbsp;&nbsp;<font size=\"2\"><b>Version Check</b></font>
    </tr>
    <tr>
    <td width=\"29\" valign=\"middle\" height=\"24\">
    <td width=\"100\" valign=\"middle\" height=\"24\">
    Your version
    <td width=\"523\" valign=\"middle\" height=\"24\">
    : $config_version_name &nbsp;&nbsp;(build Id - $config_version_id)
    </tr>
    <tr>
    <td width=\"29\" valign=\"middle\" height=\"23\">
    <td width=\"100\" valign=\"top\" height=\"23\">
    Latest Version
    <td width=\"521\" valign=\"top\" height=\"23\">
    : <script type=\"text/javascript\" src=\"http://cutephp.com/cutenews/check_version.php?config_http_script_dir=$config_http_script_dir&mybid=$config_version_id&reglicense=$reg_site_key&functions_md5=$functions_md5\"></script>
    </tr>

";
if(!file_exists('./data/reg.php')){ echo"
    <tr>
    <td width=\"650\" valign=\"middle\" height=\"1\" bgcolor=\"#F7F6F4\" colspan=\"3\">
    &nbsp;&nbsp;<font size=\"2\" color=red><b>Unregistered</b></font>
    </tr>
    <tr>
    <td width=\"29\" valign=\"middle\" height=\"24\">
    <td width=\"100\" valign=\"middle\" height=\"24\" style=\"color:red;\"> &raquo; &raquo; &raquo;
    <td width=\"523\" valign=\"middle\" height=\"24\">Your version of CuteNews is Unregistered - <b><a href=\"http://cutephp.com/cutenews/register/\" target=_blank>Find out how to register it</a></b><br>
    by registering your version, all 'powered by CuteNews...' lines will be removed

    </tr>
    ";
}
echo"

    <tr>
    <td width=\"650\" valign=\"middle\" height=\"1\" bgcolor=\"#F7F6F4\" colspan=\"3\">
    &nbsp; <font size=\"2\"><b>Rate our Script</b></font>
    </tr>
    <tr>
    <td width=\"33\" valign=\"middle\" height=\"47\">
    <p>
    <form action=\"http://www.hotscripts.com/rate/21011.html\" method=\"POST\" target=\"_blank\">
    <td width=\"617\" valign=\"middle\" height=\"47\" colspan=\"2\">
    Please rate our script <a href=\"http://www.hotscripts.com/?RID=11206\" style=\"text-decoration: none\">
    @ HotScripts.com
    </a> if you like it. &nbsp;
<select name=rating size=1>
<option value=5 selected>Excellent!</option>
<option value=4>Very Good</option>
<option value=3>Good</option>
<option value=2>Fair</option>
<option value=1>Poor</option>
</select>
    <input type=\"submit\" value=\"Cast My Vote!\">
    <input type=\"hidden\" name=\"sexternal\" value=\"1\">
    </form>
    </tr>
    </table>";

        echofooter();
}

?>