Beispiel #1
0
 public override string GenPhpCode()
 {
     if (PhpGenerator.FunctionExists("Node_Subtract") == false)
     {
         string implem = "function Node_Subtract($_a, $_b)\r\n" +
                         "{\r\n" +
                         "\t$_c = $_a - $_b;\r\n" +
                         "\treturn $_c;\r\n" +
                         "}\r\n";
         PhpGenerator.GenFunction("Node_Subtract", implem);
     }
     return(null);
 }
Beispiel #2
0
 public override string GenPhpCode()
 {
     if (PhpGenerator.FunctionExists("Node_Append") == false)
     {
         string implem = "function Node_Append($_a, $_b, $_c, $_d)\r\n" +
                         "{\r\n" +
                         "\t$_out = $_a.$_b,$_c.$_d;\r\n" +
                         "\treturn $_out;\r\n" +
                         "}\r\n";
         PhpGenerator.GenFunction("Node_Append", implem);
     }
     return(null);
 }
 public override string GenPhpCode()
 {
     if (PhpGenerator.FunctionExists("Node_Connect") == false)
     {
         string implem = "function Node_Connect($_address, $_username, $_password, $_database)\r\n" +
                         "\t{\r\n" +
                         "\t$_con = mysqli_connect($_address, $_username, $_password, $_database);\r\n" +
                         "\tif(mysqli_connect_errno())\r\n" +
                         "\t{\r\n" +
                         "\treturn false;\r\n" +
                         "\t}\r\n" +
                         "\telse\r\n" +
                         "\t{\r\n" +
                         "\treturn true;\r\n" +
                         "\t}\r\n" +
                         "\t}\r\n";
         PhpGenerator.GenFunction("Node_Connect", implem);
     }
     return(null);
 }
 public override string GenPhpCode()
 {
     if (PhpGenerator.FunctionExists("Node_Compare") == false)
     {
         string implem = "function Node_Compare($_a, $_b, $_op, $_true, $_false)\r\n" +
                         "{\r\n" +
                         "\tif($_op == \"==\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a == $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\telse if($_op == \"!=\" || $_op == \"<>\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a != $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\telse if($_op == \">\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a > $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\telse if($_op == \"<\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a < $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\telse if($_op == \">=\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a >= $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\telse if($_op == \"<=\")\r\n" +
                         "\t{\r\n" +
                         "\tif($_a <= $_b) return $_true;\r\n" +
                         "\t}\r\n" +
                         "\treturn $_false;\r\n" +
                         "}\r\n";
         PhpGenerator.GenFunction("Node_Compare", implem);
     }
     return(null);
 }